Hadithcore
Riyad as-Salihin, 1459

'Ali (May Allah be pleased with him) reported:

The Messenger of Allah (ﷺ) said to me and to Fatimah (May Allah be pleased with her) (Ali's wife and the Prophet's daughter), "When you go to bed, recite: Takbir (Allahu Akbar) thirty-three times and Tasbih (Subhan-Allah) thirty-three times and Tahmid (Al-hamdu lillah) thirty-three times." Another narration is: The Messenger of Allah (ﷺ) said, "Recite Tasbih thirty-four times." Another narration is: The Messenger of Allah(ﷺ) said, "Recite Takbir thirty-four times." <b>[Al-Bukhari and Muslim]</b>.

وعن علي رضي الله عنه أن رسول الله صلى الله عليه وسلم قال له ولفاطمة، رضي الله عنهما‏:‏ ‏"‏إذا أويتما إلى فراشكما، أو‏:‏ إذا أخذتما مضجعكما - فكبرا ثلاثًا وثلاثين، وسبحا ثلاثًا وثلاثين، واحمدا ثلاثًا وثلاثين‏"‏ وفي رواية‏:‏ التسبيح أربعًا وثلاثين‏"‏ وفي رواية‏:‏ ‏"‏التكبير أربعًا وثلاثين‏"‏ ‏(‏‏(‏متفق عليه‏)‏‏)‏‏.‏

References1 variant
In-Book Reference
Book 15, Hadith 52
Sharh · explanationclick to expand
<b>Guidance from the Hadith:</b><br> 1) Remembering Allah Almighty upon going to bed by saying Subhān Allah, Allahu Akbar, and Al-hamdulillāh, as reported in the Hadith, gives the one who says that strength in his body that enables him to endure his burdens and accomplish his tasks.<br> 2) A man should urge his household to remember Allah Almighty and try to attach their hearts to the Hereafter. In the full text of the Hadith, it is mentioned that Fātimah (may Allah be pleased with her) came to the Prophet (may Allah’s peace and blessings be upon him) to complain of the hardship she was suffering. So, he said to her and her husband, ‘Ali: “Shall I guide the two of you to what is better than what you asked for? When you go to bed...” [Narrated by Al-Bukhāri]