Sunan an-Nasa'i, Book 20, Hadith 107 (In-Book)

Sufyan narrated from Habib bin Abi Thabit, from Muhammad bin Ali, from his father, from his grandfather, that: The Prophet got up at night and cleaned his teeth, then he prayed two rak'ahs, then he slept. Then he got up and cleaned his teeth, then he performed wudu and prayed two rak'ahs, until he had prayed six. Then he prayed witr with three rak'ahs, and prayed two rak'ahs.

أَخْبَرَنَا مُحَمَّدُ بْنُ رَافِعٍ، قَالَ حَدَّثَنَا مُعَاوِيَةُ بْنُ هِشَامٍ، قَالَ حَدَّثَنَا سُفْيَانُ، عَنْ حَبِيبِ بْنِ أَبِي ثَابِتٍ، عَنْ مُحَمَّدِ بْنِ عَلِيٍّ، عَنْ أَبِيهِ، عَنْ جَدِّهِ، عَنِ النَّبِيِّ صلى الله عليه وسلم أَنَّهُ قَامَ مِنَ اللَّيْلِ فَاسْتَنَّ ثُمَّ صَلَّى رَكْعَتَيْنِ ثُمَّ نَامَ ثُمَّ قَامَ فَاسْتَنَّ ثُمَّ تَوَضَّأَ فَصَلَّى رَكْعَتَيْنِ حَتَّى صَلَّى سِتًّا ثُمَّ أَوْتَرَ بِثَلاَثٍ وَصَلَّى رَكْعَتَيْنِ ‏.‏

sunnah.com