How Did the Prophet Muhammad (PBUH) Spend the Night in Prayer?
The Prophet's Guidance on the Number of Rak'ahs in Night Prayer
Scholars have mentioned various opinions regarding the number of rak'ahs the Prophet Muhammad (peace be upon him) used to pray in night vigil, based on Hadiths from Aisha (may Allah be pleased with her). Some assert he prayed eleven rak'ahs consistently, whether in Ramadan or other times, while others cite thirteen rak'ahs. Aisha (may Allah be pleased with her) said, "The Prophet's (peace be upon him) prayer at night consisted of thirteen rak'ahs". Some scholars include the two sunnah rak'ahs of Isha or the two sunnah rak'ahs of Fajr in the total count of night prayer, considering any prayer after Isha as part of the night vigil.
One of the Prophet's night prayer practices started with two light rak'ahs. Aisha (may Allah be pleased with her) narrated, "When the Messenger of Allah (peace be upon him) stood for night prayer, he would commence his prayer with two light rak'ahs".
It's noteworthy that the Prophet's intention with these two light rak'ahs was to untie the knots that Satan places at the back of one's head while sleeping. The Prophet (peace be upon him) said, "Satan ties three knots at the back of one's head during sleep. On each knot he recites, 'The night is long, so keep on sleeping'. If one wakes up and remembers Allah, one knot is undone. If one performs ablution, another knot is undone. If one prays, all knots are undone, and one becomes lively and good-natured; otherwise, one becomes lazy and lethargic".
It should be understood that Muslims are not strictly obligated to adhere to these numbers if they intend to perform night prayer. The matter is flexible, and one may pray fewer or more rak'ahs. Variations in practice were reported among the Companions (may Allah be pleased with them).
The Prophet's Guidance on the Method of Night Prayer
It is reported how the Prophet (peace be upon him) used to perform his night prayers, consisting of eleven rak'ahs. He would pray four rak'ahs continuously, then another set of four rak'ahs, followed by three rak'ahs of Witr prayer. This could mean he prayed four rak'ahs, making taslim after every two rak'ahs, taking a short break, then repeating this pattern for the next four rak'ahs, and concluding with three rak'ahs of Witr prayer. This is based on the Prophet's statement, "The night prayer is offered two by two".
Alternatively, he would pray four rak'ahs with one taslim, then another four rak'ahs with one taslim, and finally three rak'ahs with one taslim, based on the apparent wording in the hadith narrated by Aisha (may Allah be pleased with her): "The Messenger of Allah (peace be upon him) did not increase his prayers during Ramadan or at any other time beyond eleven rak'ahs, praying four rak'ahs—do not ask about their beauty and length—then he would pray four rak'ahs—do not ask about their beauty and length—then he would pray three rak'ahs".
During his night prayers, the Prophet (peace be upon him) would stand praying until his feet became swollen, expressing gratitude to Allah and seeking His mercy. He would also prolong his recitation during the night prayer and extend his glorification in ruku' and sujud.
Most scholars from the Maliki, Shafi'i, and Hanbali schools (and a sound opinion among the Hanafis) agree that the Prophet's (peace be upon him) practice in the Witr prayer was to recite Surah Al-Ala in the first rak'ah, Surah Al-Kafirun in the second rak'ah, and Surah Al-Ikhlas in the third rak'ah. This is supported by what was narrated from Ibn Abbas (may Allah be pleased with him): "The Messenger of Allah used to perform Witr prayer with three rak'ahs, reciting in the first rak'ah: 'Glorify the name of your Lord, the Most High,' in the second: 'Say, O disbelievers,' and in the third: 'Say, He is Allah, [Who is] One'."
The Prophet's Guidance on the Timing of Night Prayer
The time for performing night prayer begins after the Isha prayer and its recommended (sunnah) prayers. However, it is best for a Muslim to follow the guidance of the Prophet (peace be upon him) by praying the night prayer after half of the night has passed. This was the practice of Prophet David (peace be upon him), who would sleep for half the night, wake up for one-third of it to pray, and then sleep for the remaining sixth of the night. The Prophet (peace be upon him) said, "The most beloved prayer to Allah is the prayer of David. He would sleep half the night, then wake up, then sleep the remainder, and stand for one-third of the night after half of it has passed".
The latter part of the night is preferred for prayer because Allah descends to the lowest heaven during that time. Therefore, it is most beneficial for a Muslim to strive to pray during this hour. The Prophet (peace be upon him) said, "The Lord descends every night to the lowest heaven when one-third of the night remains and says, 'Who will call upon Me, that I may answer him? Who will ask of Me, that I may give him? Who will seek My forgiveness, that I may forgive him?'"
If a Muslim believes they will not wake up later in the night to pray, it is better for them to perform the Witr prayer before sleeping. However, for those confident they will wake up, it is better to perform Witr prayer at night's end. This view is agreed upon by the Hanafi, Maliki, Shafi'i, and Hanbali schools of thought. The evidence for this is the Prophet's (peace be upon him) statement, "Whoever fears that he will not wake up at the end of the night, let him pray Witr at the beginning of it. And whoever hopes to wake up at the end of the night, let him pray Witr at the end of it, for indeed, the prayer at the end of the night is witnessed, and that is better".
The Virtue of Following the Sunnah of the Prophet
Allah, the Most High, has commanded believers to follow His Messenger Muhammad (peace be upon him), as it entails goodness, happiness, and salvation for them. Allah says, "And We have not sent any messenger except to be obeyed by permission of Allah". (Quran, 4:64)
Following the Prophet (peace be upon him) is a fundamental principle of the established religion. One's faith is incomplete without following the Prophet (peace be upon him), and no one can be saved from the punishment of the Hereafter unless they adhere to Islam and follow the guidance of the Prophet Muhammad (peace be upon him). This is emphasized in the Hadith: "The best guidance is the guidance of Muhammad (peace be upon him)".
Among the fruits of following the Prophet (peace be upon him) is attaining the love of Allah Almighty. The extent to which one follows the Sunnah of the Prophet determines the love of Allah for them, as Allah says, "Say, [O Muhammad], 'If you should love Allah, then follow me, [so] Allah will love you'." (Quran, 3:31)