But the LORD was with Joseph in the prison and showed him his faithful love. And the lord made Joseph a favourite with the prison warden. Before long, the warden put Joseph in charge of all the other prisoners and over everything that happened in the prison. The warden had no more worries, because Joseph took care of everything. The LORD was with him and caused everything he did to succeed. (Genesis39:21–23)
Twice we read in that short account, "The Lord was with Joseph." Joseph began to see the hand of God in his prison experience. In what could have been the direst of positions, the dreariest of places, Joseph prospered. Because of this, he was freed up to be used by God strategically in the lives of at least two men. Amazingly, he prospered in prison—of all places.
False accusations put Joseph in prison, but it was the Lord who stayed near him and nurtured his soul while he was there. As a result, Joseph found favor even in the eyes of the chief jailer—what we might call the prison warden—to the point where the man trusted Joseph to supervise all the other prisoners. The warden trusted and respected Joseph so much that he "did not supervise anything under Joseph's charge because the LORD was with him; and whatever he did, the LORD made to prosper."
You see, the Lord God remained first in Joseph's life; He was the focus of his life. The lens of God's will stood between Joseph and his circumstances, enabling Joseph to see God in them, to read God in them—and enabling God to use him in them.
When a dungeon experience comes, the quickest and easiest response is to feel that you've been forgotten by God. I don't know if you read the cartoon "Ziggy," but I enjoy him—maybe because he often says the very things I've been thinking! One of my favorites shows Ziggy, with his big nose and bald head, standing on a mountain and staring far above him. The sky is dark, and there is one lonely cloud up there. Ziggy yells, "Have I been put on hold for the rest of my life?"
You've felt like that, haven't you? "Lord, will You ever answer?" How often the heavens seem more like cold brass than God's loving abode. We cry out, but nothing comes in return.
Make no mistake about it, Joseph didn't deserve jail, but he responded to it beautifully. That's the marvel of the story. First and foremost in his life was his vital and consistent relationship with his Lord. And because of that, God used him in strategic and significant ways.