How Jacob's Night at the Place Shaped the Three Daily Prayers

Yalkut Shimoni on Torah 117:4

"And he came upon the place" (Genesis 28:11). [This teaches that] the early patriarchs instituted the prayers (this is written at Remez 77). Rabbi Shmuel bar Nachman said: corresponding to the three times that the day changes. At the evening prayer a person should say: May it be Your will, O LORD my God, that You bring me out from darkness to light. In the morning he should say: I thank You, O LORD my God, that You have brought me out from darkness to light. At the afternoon prayer he should say: May it be Your will, O LORD my God and God of my fathers, that just as You have granted me to see the sun in its rising, so may You grant me to see it in its setting. The Rabbis say: they instituted them corresponding to the daily offerings. The morning prayer corresponds to the morning daily-offering, and the afternoon prayer corresponds to the offering of the late afternoon. For the evening prayer they found no fixed basis. Rabbi Tanchuma said: it too has a fixed basis, corresponding to the limbs and fats that were consumed upon the altar all through the night. "And he came upon the place." He sought to pass on, and the world became a wall before him. The Rabbis say: "for the sun had set" [literally, "the sun, the sun"] (Genesis 28:11) teaches that the Holy One, blessed be He, caused the sun to set before its time in order to speak with Jacob our father in private. A parable: to a beloved friend of the king who would come to him from time to time. The king said: extinguish the lamps, for I wish to speak with my friend in private. So too the Holy One, blessed be He, caused the sun to set before its time in order to speak with Jacob in private.

Themes