Ali bin Abu Talib reported,

Fatimah complained of the hardship she suffered in her hands from grinding at the hand mill. Some captives had been brought to the Prophet ﷺ, so she set out to see him but did not find him. She met Ayesha instead and told her about it. When the Prophet ﷺ returned, Ayesha told him that Fatimah had come to her.The Prophet ﷺ then came to us after we had already lain down in our beds, and we began to get up.He said, "Stay where you are."Then he sat down between us, so close that I felt the coolness of his foot against my chest.He said, "Shall I not teach you something better than what you asked for? When you lie down in your beds, say Allah is greatest thirty four times, glorify Him thirty three times, and praise Him thirty three times. That is better for you than a servant."In the narration of Muaz, the wording is, "when you lie down in your bed at night."

Muslim 6916

Sahih

و حدثناه أبو بكر بن أبي شيبة حدثنا وكيع ح و حدثنا عبيد الله بن معاذ حدثنا أبي ح و حدثنا ابن المثنى حدثنا ابن أبي عدي كلهم عن شعبة بهذا الإسناد وفي حديث معاذ أخذتما مضجعكما من الليل

مسلم 6916صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Remembrance, supplication, Tawba, and seeking forgiveness
Chapter
Glorification at the beginning of the day and at sleep
Numbering
Darussalam 6916
Muslim 6916