(11) باب قِيَامِ النَّبِيِّ صلى الله عليه وسلم بِاللَّيْلِ وَنَوْمِهِ وَمَا نُسِخَ مِنْ قِيَامِ اللَّيْلِ
Narrated Anas bin Malik:
Sometimes Allah's Messenger (ﷺ) would not fast (for so many days) that we thought that he would not fast that month and he sometimes used to fast (for so many days) that we thought he would not leave fasting throughout that month and (as regards his prayer and sleep at night), if you wanted to see him praying at night, you could see him praying and if you wanted to see him sleeping, you could see him sleeping.
Reference: Sahih al-Bukhari 1141
In-book reference: Book 19, Hadith 22
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 2, Book 21, Hadith 242