But the LORD was with Joseph, and showed him mercy, and gave him favor in the sight of the keeper of the prison.
All Commentaries on Genesis 39:21 Go To Genesis 39
Ambrose of Milan
But what wonder if Christ visits those who lie in prison? He reminds us that he himself was shut up in prison in his followers, as you find it written, “I was in prison, and you did not come to me.” Where does God’s mercy not enter in? Joseph found favor of this sort; he who had been shut up in the prison kept the locks of the prison, while the jailer withdrew from his post and entrusted all the prisoners to his power. Consequently Joseph did not suffer from prison but even gave relief to others as well from the calamity of imprisonment.