These two hadeeths explain what a person should recite before going to bed. The first is the hadeeth of Alee, may Allah be pleased with him, and Faatimah bint Muhammad, may Allah be pleased with
her. Faatimah complained to her father about her experience with the hand mill and she requested a servant from her father. But he ﷺ said, “Shall I know guide the both of you to something better than a servant?” Then he ﷺ directed them to it, which is: if they go to bed, they should recite the Tasbeeh (that is, Subhaanallaah) thirty-three times, the Tahmeed (that is, Al-Hamdulillaah) thirty-three times, and the Takbir (that is, Allahu Akbar) thirty-four times. He ﷺ said; “This is better for both of you than a servant.”
Therefore, it is recommended for one to recite Tasbeeh thirty-three times, Tahmeed thirty-three times, and Takbeer thirty-three or thirty-four times, which makes a total of one hundred, when one lies down to sleep. This is one of the ways that aid a person in fulfilling his needs. Similarly, if he sleeps, he will sleep upon the remembrance of Allah, the Mighty and Sublime.
So also is the hadeeth of Aboo Hurayrah (may Allah be pleased with him). When any of you goes to bed, he should dust off his bedsheet with part of his loin cloth three times. The wisdom behind this, and Allah knows best, is to protect the loin cloth from being soiled by any filth that may be on the bed. He should say, “Bismika Rabbi wada’tu janbi, wa bika arfa’uhu, in amsakta naafsi farhamha, wa in arsaltaha fahfazha bima tahfazu bihi ibadakas-saliheen (With Your Name, my Lord, I place my side upon the bed, and with Your Grace I will raise it up. If You withhold my soul (cause me to die), have mercy on it but if You let it go (let me live), guard it against which You guarded your pious slaves.”) This is because if a person sleeps, Allah, the Most High, takes his soul as He stated:
“It is Allah Who takes away the souls at the time of their death, and those that die not during their sleep.” [Az-Zumar: 42]
However, the act of taking of the soul during sleep is not like taking it at death, although it is a form of death. Consequently, a person looses his consciousness and he is not aware of his surroundings. That is why Allah the Most High called it death. The most High said:
“It is He Who takes your souls by night (when you are asleep), and has knowledge of all that you have done by day, then He raises (wakes) you up again.” [Al-An’ām: 60].
Therefore, it is required of one to recite this invocation: Bismika Allaahumma ahyaa wa amoot; bismika Rabbee wada’tu janbee wa bika arfa’uhu, in amsakta nafsee fa’rhamhaa wa in arsaltahaa fa’hfadhhaa bimaa tahfadh bihee ‘ibaadaka As-Saaliheen” (meaning: In Your Name, my Lord, I place my side upon the bed, and with Your Grace I will raise it up. If You withhold my soul (cause me to die), have mercy on it but if You let it go (let me live), guard it against which You guarded Your pious slaves.)
And Allah alone grants success.