In this week's Torah portion of Vayetze, Jacob is exhausted from being on the run from his brother Esau after getting his blessing through deceptive means.
He finds himself at a random location, later Jewish thinkers say that it is Jerusalem. The same commentators say that God made the sun set early so that Jacob would stop, rest, and spend the night there.
“The better your sleep, the more clearly you can think while awake, and it may enable you to seek help when a problem arises. - Dr Joshi, Stanford