IT IS SUNNAH for a person performing Witr with three rak‘ahs to recite in the first, after al-Fātiḥah, Sabbiḥi-sma Rabbika-l-A‘lā (“Glorify the name of your Lord, the Most High” [1].); in the second Qul Yā ayyuha-l-kāfirūn (“Say: O you who reject faith” [2].); and in the third Qul Huwa-llāhu Aḥad (“Say: He is Allah, One” [3].) and the Mu‘awwidhatayn. If he forgets to recite Sabbiḥi-sma Rabbika-l-A‘lā, he should recite it with Qul Yā ayyuha-l-kāfirūn in the second. Likewise, if he forgets to recite Qul Yā ayyuha-l-kāfirūn in the second, he should recite it in the third together with Qul Huwa-llāhu Aḥad and the Mu‘awwidhatayn.
We relate in the Sunans of Abū Dāwūd, an-Nasā’ī and others, with a ṣaḥīḥ isnād, from Ubayy ibn Ka‘b
who reported that when the Messenger of Allah
said the salām in Witr he said: “Glory be to the King, the All-Holy,” [4].and in the narration of an-Nasā’ī and Ibn as-Sunnī “Glory be to the King, the All-Holy” three times.
Subḥāna-l-Maliki-l-Quddūs.
And we relate from the Sunans of Abū Dāwūd, at-Tirmidhī and an-Nasā’ī from ‘Alī
, who reported that the Messenger of Allah
used to say at the end of Witr: “O Allah, I seek protection in Your pleasure from Your wrath and in Your forgiveness from Your punishment. I seek protection from You in You. I cannot enumerate Your praise; You are as You have praised Yourself.” [5].At-Tirmidhī describes this hadith as ḥasan.

Allāhumma innī a‘ūdhu bi-riḍāka min sakhaṭik, wa a‘ūdhu bi-mu‘āfātika min ‘uqūbatik, wa a‘ūdhu bika mink, lā uḥṣī thanā’an ‘alayk, Anta kamā athnayta ‘alā nafsik.
References
[1] Qur’ān 87:1.
[2] Qur’ān 109:1.
[3] Qur’ān 112:1.
[4] Abū Dāwūd (1423) and Ibn as-Sunnī (711).
[5] Abū Dāwūd (1423), at-Tirmidhī (3561), and an-Nasā’ī (3/249).