Genesis 39:19–23 describes Joseph’s arrival in the Egyptian prison reserved for the king’s prisoners. Joseph’s once-trusting master has him jailed after the master’s wife falsely accuses Joseph of attempted rape. Despite the unfair imprisonment, God has not abandoned Joseph. That Joseph isn’t immediately executed speaks well of both his reputation and the Lord’s protection. Even in prison, Joseph is blessed: the king’s jailer favors Joseph and quickly puts him in charge of nearly all of duties in the jail. Joseph continues to succeed in every circumstance he faces, under God’s provision.
For a more detailed explanation select the link below.
“Genesis 39:23” Bibleref.com
23 The keeper of the prison didn’t look after anything that was under his hand, because Yahweh was with him; and that which he did, Yahweh made it prosper.