The Tahajjud is a special Islamic prayer which is recommended (but not required) for all Muslims. The Tahajjud is prayed after Isha (the obligatory nightly prayer) and before Fajr (the obligatory morning prayer). If possible, it is most desirable to perform the Tahajjud between midnight and Fajr, preferably in the last third of the night. Though the Tahajjud isn’t required, many devout Muslims try to make it part of their daily routine as an act of worship and to earn redemption and forgiveness from Allah. To learn how to pray the Tahajjud in the way laid out by the Prophet Muhammad (pbuh), see Step 1 below.
Preparing For Prayer
1. Arrange to wake up after midnight. After praying the Isha prayer and before going to sleep, make arrangements to wake up during the night before the Fajr prayer (for instance, you may want to set an alarm clock or have a family member agree to wake you). Though the Tahajjud can be prayed at any part of the night, if possible, it is best to pray it after midnight, especially during the last third of the night. The time two-thirds of the way between Maghrib and Fajr is a good time for Tahajjud. This is because Allah descends to the lowest heaven during the last third of the night, asking, “Who is asking me, so I can give to him? Who is calling upon me, so I can answer him? Who is seeking my forgiveness, so I can forgive him?'” 
If you make an honest effort to wake up and perform the Tahajjud but accidentally sleep through the night, don’t feel guilty. According to the Hadiths, Allah records your genuine intention to perform the Tahajjud and grants you sleep as an act of mercy.
Wake up and perform Wudu. Wake up during the night at the time you’ve chosen. Once you wake, perform Wudu, the ritual ablution Muslims use to cleanse themselves before they pray or handle the Holy Quran. Traditionally, performing Wudu means using clean water to wash oneself in the following four ways:
Washing the face
Washing the arms and hands up to and including the elbows
Wiping the head (Masah)
Washing the feet up to the ankles
Note that many Muslims (including the Prophet Muhammad [pbuh]) also choose to wash their mouth and teeth with a miswak before the Tahajjud.
Next, go somewhere clean, quiet, and dignified to conduct your prayer. This is done because Allah’s names are pure, so, whenever possible, Muslims are encouraged to speak of Him in clean, holy places as a form of reverence. Wearing your normal prayer clothes, sit down on a prayer mat and face the Holy Kabah in Mecca as you would for your obligatory prayers.
To be clear, you don’t need to be anywhere special, like a mosque or a lavishly-decorated room in your house, to pray the Tahajjud. All that’s needed is a spot that’s clean which can even be in your room.
Remove all worldly worries from your heart. The time for prayer is to calmly focus and reflect on the glory of your Lord. It’s not for worrying about fleeting worldly problems that are ultimately meaningless in comparison to His infinite wisdom and mercy. Calm yourself and forget your worldly problems, hopes, and fears. Ignore any negative, distracting thoughts or feelings. Close your eyes and focus your attention on the region of your heart as you begin to achieve a heightened state of spiritual awareness.
Saying the Tahajjud
Make your intention to pray known. As you start your prayer, make a definitive mental declaration to yourself that you are about to perform the Tahajjud. Decide that you are going to complete the Tahajjud in the specific way you have chosen, including how many rakats and which surahs you will recite. Also decide why you are saying the Tahajjud — for instance, to glorify Allah, thank Allah or ask for His forgiveness. You don’t have to make this declaration out loud — Allah knows your thoughts, so your intentions will be clear to him as long as they are clear to you.
The Tahajjud is typically performed by repeating multiple rakats (cycles) of Salah, the ritual that Muslims use for their required daily prayer. For the Tahajjud, the rakats are usually performed in pairs, so you’ll also want to decide exactly how many rakats you intend to perform at this time. See below for more information.
Perform two rakats. To begin your Tahajjud, start by performing two rakats (cycles) of Salah. Salah begins by standing and reciting verses from the Holy Quran. Then, the person praying continues by bowing low with his hands on his knees, then prostrating on the ground with his forehead, nose, and palms on the floor and his elbows raised, sitting on his knees with his feet folded under him, and finally standing and reciting “Allahu Akbar.” This description of Salah is a generalization — if you’re not sure how to perform Salah properly, learn this fundamental Muslim skill before attempting the Tahajjud.
Emulate the practices of the Prophet Muhammad (pbuh) who used to recite the following surahs after each rakat in Tahajjud:
After reciting the Al-Fatihah the first rakat, recite the surah “Al-Kafirun”.
After reciting the Al-Fatihah for the second rakat, recite the surah “Al-Ikhlas”.
Repeat rakats as you wish. Generally, two rakats is seen as the minimum necessary for a proper Tahajjud. However, it’s possible to repeat as many more as you wish. For instance, according to the Hadiths, the Prophet Muhammad frequently prayed up to thirteen rakats. For most Muslims, Tahajjud rakats are performed in pairs and eight rakats is seen as plenty. In other words, most Muslims will say two, four, six, or eight rakats, though more is not necessarily discouraged.
If you are able to, then reciting long surahs such as Al-Baqarah, An-Nisā’ or Al-‘Imran are highly commended, even if you can manage them only from time to time.
Following in the example of the Prophet Muhammad (pbuh), if you notice dawn approaching while you say your Tahajjud, you may end by performing one rakat as Witr (an optional pre-dawn prayer said before the required Fajr).
Add your own prayers after the rakats. After you’ve completed the number of rakats you set out to pray, you may add whichever of your own prayers that you wish as long as they’re sincere, respectful, and done in complete devotion to Allah. These may be offered in extended prostration. You may want to offer additional thanks and praise to Allah, pray for strength and guidance, or make a special request for help. For instance, after completing your rakats, you may ask for good fortune for a friend or another individual who’s suffering through difficult times. This is an ideal time to pray for forgiveness for your sins. Acknowledge what you have done wrong, promise not to repeat it and sincerely ask Allah for forgiveness and leniency in any punishment that He may decide to prepare for you. Any prayer you offer will be heard, and, if Allah wills, your prayer will be answered in kind.
5. If you become too tired to complete the Tahajjud, go back to bed. Because the Tahajjud interrupts your normal sleep, it’s not unlikely that you may be somewhat tired when you attempt the prayer. If, however, you’re so tired that you find yourself forgetting what you’re saying as you recite your prayers or you doze off in the middle of your Tahajjud, don’t attempt to complete the prayer. In this case, according to the Hadiths, Allah notes your sincere willingness to complete the Tahajjud. You may go back to sleep without any need to be embarrassed or ashamed, but try to better prepare yourself next time.