Lamentations states that "The Lord's mercies are not consumed, surely His compassions do not fail. They are new every morning; great is Your faithfulness."[3] From this, the Shulchan Aruch deduces that every morning, God renews every person as a new creation. This prayer serves the purpose of expressing gratitude to God for restoring one's soul each morning.
The specific prayer Modeh Ani, however, is not mentioned in the Talmud or Shulchan Aruch, and first appears in the work Seder haYom by the 16th century rabbi Moshe ben Machir.[4]
As this prayer does not include any of the names of God, observant Jews may recite it before washing their hands. According to the Kitzur Shulchan Aruch, one should pause slightly between the words "compassion" and "abundant".
In Talmudic times, Jews traditionally recited Elohai Neshamah (Hebrew: אֱלהַי נְשָׁמָה, "My God, the soul") upon waking. The prayer was later moved to the morning synagogue services.[5]