Tikkun Chatzot (Hebrew: תקון חצות, lit. "Midnight Rectification"), also spelled Tikkun Chatzos, is a Jewish ritual prayer recited each night after midnight as an expression of mourning and lamentation over the destruction of the Temple in Jerusalem. It is not universally observed, although it is popular among Sephardi and Hasidic Jews.
The Talmudic sages wrote that every Jew should mourn the destruction of the Temple. The origin of the midnight time for prayer and study lies in Psalm 119:62, attributed to David: "At midnight I will rise to give thanks unto thee." It is said that David was satisfied with only "sixty breaths of sleep" (Sukk. 29b), and that he rose to pray and study Torah at midnight. The custom was fixed as a binding Halakha.
At first, Mizrahi Jews would add dirges (kinnot) for the destruction only on the three sabbaths that are between the Seventeenth of Tamuz and Tisha B'Av, and not on weekdays. After discussions that questioned this practice of mourning specifically on the Sabbath, it was decided to discontinue the recitation of the kinnot on these days. Rabbi Isaac Luria canceled the customs of mourning on the Sabbath but declared that the Tikkun Chatzot should be said each and every day.
The Shulchan Aruch 1:3 states, "It is fitting for every God-fearing person to feel grief and concern over the destruction of the Temple". The Mishnah Berurah comments, "The Kabbalists have discussed at great lengths the importance of rising at midnight [to say the Tikkun Chatzot, learn Torah, and to talk to God] and how great this is".