How to pray the Sunnah prayer?.
The Messenger of Allah, Muhammad (PBUH), commanded the believers to perform some of the voluntary and Sunnah prayers in their homes, as Ibn Umar narrated that the Prophet (PBUH) said: "Offer some of your prayers at home, and Do not take your houses as graves" (Sahih Albukhari 432). And as narrated by Zaid bin Thabit: "The Messenger of Allah (PBUH) made an apartment with the help of the leaves of date trees or of mats, the Messenger of Allah (PBUH) went out to pray in it, people followed Him and came to pray with Him, then they came again one night and waited, but the Messenger of Allah delayed incoming out, they cried aloud and threw pebbles at the door, the Messenger of Allah came out in anger and said to them By what you have been constantly doing, I was inclined to think that it might not become obligatory for you, so you must observe prayer in your houses, for the prayer observed by a man in the house is better except the obligatory prayer" (Sahih Muslim 781).
So there is a great merit and reward in performing voluntary prayer at home because it is far from hypocrisy and it is closer to sincerity, in addition to that, blessings and mercy descend upon the home, and the Angels descend while Satan is kept away by it. Sunnah or supererogatory prayers are extra rak'ahs before or after the obligatory prayers (Fard), or independent prayers performed at different times such as: Qiyam prayer, Tahajjud prayer, and Duha prayer.
Regarding the Sunnah prayers that are connected to the obligatory prayers, the Prophet Muhammad (PBUH) used to perform them at home, as Abdullah bin Shaqiq reported: "I asked Aisha about the voluntary prayer of Allah's Messenger (PBUH), and she replied before Dhuhr prayer (Noon), He used to pray four Rak'ahs in my house, then He would go out and lead the people in prayer, then come in and pray two Rak'ahs, He would then lead the people in the Maghrib prayer (Sunset), then come in and pray two Rak'ahs, then He would lead the people in the Ishaa prayer (Evening), and enter my house and pray two Rak'ahs, He would pray nine Rak'ahs during the night, including Witr. At night He would pray for a long time standing and for a long time sitting, and when He recited the Holy Quran while standing, He would bow and prostrate Himself from the standing position, and when He recited while sitting, He would bow and prostrate Himself from the sitting position, and when it was Fajr (Dawn), He would pray two Rak'ahs" (Sahih Muslim 730).
And as for Duha prayer is a confirmed Sunnah, and the Prophet (PBUH) recommended His companions to perform it regularly, as Abu Hurayrah reported: "My Friend i.e. the Prophet (PBUH) advised me to observe three things: to fast three days a month, to pray two Rak'ahs of Duha prayer, and to pray Witr before sleeping" (Sahih Albukhari 1981), and Abu Dharr narrated that the Messenger of Allah (PBUH) said: "In the morning, charity is due from every bone in the body of every one of you. Every utterance of Allah's Glorification (Subhaba Allah: Glory to be Allah) is an act of charity, every utterance of Praise (Alhamdu lellah: Praise be to Allah) is an act of charity, every utterance of His Oneness (La ilaha ella Allah: there is no god but Allah) is an act of charity, and every utterance of His Greatness (Allahu Akbar: Allah is the Greatest) is an act of charity, enjoining the right is an act of charity and forbidding from the wrong is an act of charity, and two Rak'ahs which one prays in the Forenoon (Duha prayer) will suffice all of that" (Sahih Muslim 720).
So according to this Hadith, the minimum number of Rak'ahs of Duha prayer is two, and the maximum is eight, as Umm Hani' bint Abi Talib reported that when it was the day of conquest of Mecca, she went to the Messenger of Allah (PBUH), and He was staying at a higher part, the Messenger of Allah got up for His bath, and Fatima held a curtain around Him, He then put on His garments and wrapped Himself with that and then offered eight Rak'ahs of the Forenoon prayer" (Sahih Muslim 336 b). The time of Duha prayer begins a quarter of an hour or more after the time of sunrise and continues until fifteen minutes before Dhuhr prayer.
