John Gills Exposition of the Bible Commentary - Genesis 40:14
But think on me, when it shall be well with thee ,.... He desires no reward for the interpretation of his dream, only that he would remember him in adversity, when he should be in prosperity in Pharaoh's court, and speak a good word for him, which was the least he could do; and though Joseph knew by his own dreams that he should be raised from his low estate to a very high and advanced one, yet he thought proper, in a dependence on God, to make use of all lawful means for his deliverance;... read more
Matthew Henry's Complete Commentary - Genesis 40:5-19
Observe, I. The special providence of God, which filled the heads of these two prisoners with unusual dreams, such as made extraordinary impressions upon them, and carried with them evidences of a divine origin, both in one night. Note, God has immediate access to the spirits of men, which he can make serviceable to his own purposes whenever he pleases, quite beyond the intention of those concerned. To him all hearts are open, and anciently he spoke not only to his own people, but to others,... read more