But the Lord was with Joseph and extended kindness to him, and gave him favor in the sight of the chief jailer. Genesis 39:21
Worries are the result of lack of faith. That is why we become so distressed and we live in uneasiness, for not knowing how things will be solved; thus, we show that we do not trust God in full.
A large percentage of problems happening are simple and do not deserve us losing our sleep over something that God can solve in a second. But our mind is so vulnerable that we formulate a series of situations, which are not real but imaginary. This leads to a disastrous end, a hopeless one, only because we allow doubt to be stronger than knowledge of the truth, on which we need to be supported at all times.
We see that Joseph did not worry when he was in prison. On the contrary, he was at peace because he had his faith placed in God and knew that something great awaited. It happened just like that; it was so great that, from living as a prisoner, he went out to govern a nation.
Let nothing make us worry because all things work for the good of those who love Him, and what is now a storm, tomorrow it will be radiance full of his glory.