A man asked the Messenger of Allah ﷺ about the night prayer. The Messenger of Allah ﷺ replied, "The night prayer is offered in pairs of two. When one of you fears the approach of dawn, let him pray a single rakah, which will make all that he has prayed odd-numbered."
حدثنا القعنبي عن مالك عن نافع وعبد الله بن دينار
أن رجلا سأل رسول الله ﷺ عن صلاة الليل فقال رسول الله ﷺ صلاة الليل مثنى مثنى فإذا خشي أحدكم الصبح صلى ركعة واحدة توتر له ما قد صلى
Bukhari narrated it, Witr, chapter on what has been said about Witr, no. 990, and Muslim, Prayer of the Traveler, chapter on the night prayer being two by two, etc., no. 749, from the hadith of Malik with this account, and it is in Muwatta (Yahya) 1/123.