The Messenger of Allah ﷺ used to perform witr with nine rakahs. Then he performed witr with seven rakahs, and he prayed two rakahs while seated after the witr, reciting in them. When he wanted to bow, he would stand, bow, then prostrate.
حدثنا موسى بن إسمعيل حدثنا حماد عن محمد بن عمرو عن محمد بن إبراهيم عن علقمة بن وقاص
أن رسول الله ﷺ كان يوتر بتسع ركعات ثم أوتر بسبع ركعات وركع ركعتين وهو جالس بعد الوتر يقرأ فيهما فإذا أراد أن يركع قام فركع ثم سجد