שִׂמְח֧וּ אֶת־יְרוּשָׁלִַ֛ם וְגִ֥ילוּ בָ֖הּ כָּל־אֹהֲבֶ֑יהָ שִׂ֤ישׂוּ אִתָּהּ֙ מָשׂ֔וֹשׂ כָּל־הַמִּֽתְאַבְּלִ֖ים עָלֶֽיהָ׃
פֿרײט זיך מיט ירושלים, און קװעלט אָן אין איר, אַלע אירע ליבהאָבער; לוסטיקט אײַך לוסטיק מיט איר, איר אַלע װאָס טרױערט אױף איר;
Sha'arei Kedusha
Arising after midnight:727To pray the Tikkun Chatzot prayer and to study Torah. Firstly, by engaging in this practice he is counted among those who mourn for Zion and Jerusalem, about which it states,728Isaiah 66:10 “Be glad in Jerusalem and rejoice in her, all you who love her, exult with her in jubilation, all you who mourn for her.” For, it is at that hour that the Holy One, blessed is He, also mourns and roars like a lion.729Talmud Bavli, Brachot 3a Moreover, in regard to one’s study of Torah at that hour, our sages, of blessed memory, stated,730Midrash Shemot Rabba 47:5; Vayikra Rabba 19:1 “The exaltation in the Torah is only at night.” Additionally, our sages, of blessed memory, stated,731Talmud Bavli, Avoda Zarah 3b; Midrash Mishlei 31:3; Tanna d’Bei Eliyahu Zuta, Pirke Derech Eretz 2 “Whoever occupies himself with Torah study at night, the Holy One, blessed is He, extends a thread of kindness upon him by day.” Our sages, of blessed memory, also stated,732Talmud Bavli, Tamid 32b “Anyone who occupies himself with Torah study at night, the Indwelling Presence of HaShem-יהו״ה (the Shechinah), is opposite him. The verse states,733Lamentations 2:19 – In reference to Torah study (Shemot Rabba 47:5). “Arise! Exalt in the night, at the beginning of the watches!” King David, peace be upon him, only merited to live in this world and in the coming world on account of this practice,734Talmud Bavli, Brachot 3b-4a and elsewhere. as written,735Psalms 119:62 “At midnight I arise to thank You for Your righteous ordinances.” The book of Zohar is filled with explanations praising this mitzvah to no end, and the Holy Spirit of Divine Inspiration (Ru’ach HaKodesh) dwells upon such a person, as mentioned there in Parshat Shemot.736Zohar II 18b