Allamah Ibn Hazm wrote in his world-famous research book al-Muhalla that there are thirteen different ways of performing Witr and Tahajjud, and that whichever way a person prays them is permissible, and he wrote that the best form in our view is this one.
The first way:
We first pray twelve rak’ahs, two by two, and give the salam after every two rak’ahs, and at the end we pray one rak’ah and give the salam. This is as mentioned in the hadith of Abdullah ibn Umar (may Allah be pleased with him) and the hadith of Aisha (may Allah be pleased with her) in Bukhari, Muslim, Abu Dawud and others.
The second way:
He first prays eight rak’ahs, giving the salam after every two rak’ahs, then prays five rak’ahs consecutively with a single tashahhud and a single salam, as mentioned in Sahih al-Bukhari and Sahih Muslim.
The third way:
He prays ten rak’ahs, two by two, and gives the salam after every two, and then prays one rak’ah, as narrated from Aisha (may Allah be pleased with her) herself in Bukhari, Muslim, Abu Dawud, Nasa’i, Ibn Majah and others.
The fourth way:
He first prays eight rak’ahs, giving the salam after every two rak’ahs, then prays one Witr, as narrated from Abdullah ibn Umar (may Allah be pleased with him) in the Sihah Sittah (the six authentic books).
The fifth way:
He prays eight rak’ahs in such a way that he does not sit for the tashahhud between them, and after completing the eight rak’ahs he performs the first tashahhud, or the first sitting, but does not give the salam; rather, after reciting the first tashahhud he stands up and completes the ninth rak’ah, then sits and gives the salam after the tashahhud, the durud and salam, and the supplication. This is as narrated from Aisha (may Allah be pleased with her) in Sahih Muslim, Abu Dawud, Nasa’i and Musnad Ahmad.
The sixth way:
He prays six rak’ahs, giving the salam after every two rak’ahs, and then prays one rak’ah, as is understood from the hadith of Ibn Umar (may Allah be pleased with him) in the Sihah Sittah.
The seventh way:
He prays seven rak’ahs in such a way that he does not sit for the tashahhud before completing the sixth rak’ah, and on completing the sixth he sits for the first tashahhud and, without giving the salam, stands up for the seventh rak’ah; after completing it he sits for the tashahhud, the durud and salam, and the supplication, and after finishing the supplication he gives the salam, as Aisha (may Allah be pleased with her) has narrated in Abu Dawud, Sunan al-Nasa’i and Musnad Ahmad.
The eighth way:
He prays seven rak’ahs in such a way that he does not sit for the tashahhud between them, and when he has prayed all seven rak’ahs, he gives the salam after the tashahhud, the durud and salam, and the supplication, as Aisha (may Allah be pleased with her) has mentioned this way in Sunan al-Nasa’i.
The ninth way:
He prays four rak’ahs, giving the salam after every two of them, and then prays one rak’ah of Witr, as is understood from the hadith narrated from Abdullah ibn Umar (may Allah be pleased with him) in the Sihah Sittah.
The tenth way:
He prays five rak’ahs in such a way that there is no sitting or tashahhud between them, and after completing the fifth rak’ah he performs, at the end, the tashahhud, the durud and salam, and the supplication, and then gives the salam, as is known from the hadith of Aisha (may Allah be pleased with her) mentioned in Bukhari, Muslim, Nasa’i and others.
The eleventh and twelfth ways:
These concern three rak’ahs, which requires some detail.
The thirteenth way:
He prays only one rak’ah and gives the salam after the tashahhud, the durud and salam, and the supplication, as in the Prophetic statement in the joint narration of Abdullah ibn Abbas (may Allah be pleased with him) and Abdullah ibn Umar (may Allah be pleased with him) in Sahih Muslim and Musnad Ahmad.
الوتر ركعة من آخر الليل
The Witr prayer is one rak’ah at the end of the night.
Remember that these thirteen forms are the shared forms of Witr and Tahajjud, and they are also called قيام الليل و صلوة الليل, and it is said, not by way of attribution (ta’liqan) but properly, ”صلوة الوتر“.