The Prophet ﷺ said, "The Maghrib prayer is the witr of the daytime prayer, so make your night prayer odd-numbered as well. The night prayer is performed in pairs of two, and the witr is a single rakah at the end of the night."
حدثنا عبد الصمد حدثنا هارون الأهوازي حدثنا محمد بن سيرين
أن النبي ﷺ قال صلاة المغرب وتر صلاة النهار فأوتروا صلاة الليل وصلاة الليل مثنى مثنى والوتر ركعة من آخر الليل
Its isnad is sahih. Harun al-Ayli is Harun bin Ibrahim, and he is trustworthy. Ibn Main and others confirmed his trustworthiness, and Bukhari gave his biography in al-Kabir 4/224. The hadith is an expanded combination of two hadiths, the first being 4992, and the second having appeared repeatedly regarding night prayer and Witr, the last of them being 5537.