(53) باب مَا يُذْكَرُ مِنْ صَوْمِ النَّبِيِّ صلى الله عليه وسلم وَإِفْطَارِهِ
Narrated Anas:
Allah's Messenger (ﷺ) used to leave fasting in a certain month till we thought that he would not fast in that month, and he used to fast in another month till we thought he would not stop fasting at all in that month. And if one wanted to see him praying at night, one could see him (in that condition), and if one wanted to see him sleeping at night, one could see him (in that condition) too.
Reference: Sahih al-Bukhari 1972
In-book reference: Book 30, Hadith 79
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 3, Book 31, Hadith 193