The Messenger of Allah ﷺ used to pray thirteen rakats during the night, making five of them his witr. He would not sit during any of those five except at the last one, where he would sit and give the salam.
حدثنا موسى بن إسمعيل حدثنا وهيب حدثنا هشام بن عروة عن أبيه
كان رسول الله ﷺ يصلي من الليل ثلاث عشرة ركعة يوتر منها بخمس لا يجلس في شيء من الخمس حتى يجلس في الآخرة فيسلم
Muslim narrated it in the Book of the Prayer of Travelers, Chapter on the Night Prayer and the Number of Rak'ahs the Prophet ﷺ Performed at Night, etc., hadith no. 737, from the hadith of Hisham bin Urwa, with this chain.