The Messenger of Allah ﷺ used to pray eight rakahs at night, then perform witr with three, and pray two more rakahs. When he grew older, he shifted to nine, then six, then three.
حدثنا أبو أحمد حدثنا أبو بكر يعني النهشلي عن حبيب بن أبي ثابت عن يحيى بن الجزار
كان رسول الله ﷺ يصلي من الليل ثماني ركعات ويوتر بثلاث ويصل الركعتين فلما كبر صار إلى تسع وست وثلاث
Its chain of transmission is sahih. Abu Bakr Nahshali, Bukhari concluded in Kuna, no. 54, that he is Bakr bin Abdullah bin Qattaf, and he is trustworthy. Ibn Main, Ibn Mahdi, Abu Dawud, and others confirmed his reliability. See 2572.