The Messenger of Allah ﷺ used to perform the witr prayer with thirteen rakats, but when he grew older and weaker, he performed it with seven.
حدثنا أبو معاوية عن الأعمش عن عمرو بن مرة عن يحيى بن الجزار
كان رسول الله ﷺ يوتر بثلاث عشرة فلما كبر وضعف أوتر بسبع