The Prophet (ﷺ) used to pray eleven rak'ahs at night, ending them with one rak'ah of witr, then he would lie down on his right side.
Sunan an-Nasa'i Book 20, Hadith 99