Abdullah bin Umar reported,

A man called out to the Messenger of Allah ﷺ while he was in the mosque, asking, "Messenger of Allah, how do I make my night prayer odd-numbered?"The Messenger of Allah ﷺ replied, "Whoever prays should pray two units at a time. If he senses that dawn is approaching, let him perform a single prostration, and that will make all that he has prayed odd-numbered."

Azami 2750

Sahih

عن ابن عمر

أن رجلا نادى رسول الله ﷺ وهو في المسجد، فقال: يا رسول الله! كيف أوتر صلاة الليل؟ فقال رسول الله ﷺ: من صلى فليصل مثنى مثنى، فإن أحس أن يصبح سجد سجدة فأوترت له ما صلى.

الأعظمي 2750صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Minor actions do not invalidate the prayer
Section
Night prayer is two rakats at a time, and Witr is one rakat at the end of the night
Numbering
Jami al-Kamil 2750 (2nd edition)
Azami 2750