Sahih al-Bukhari, Hadith 1972 ⓘ
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.
حَدَّثَنِي عَبْدُ الْعَزِيزِ بْنُ عَبْدِ اللَّهِ، قَالَ حَدَّثَنِي مُحَمَّدُ بْنُ جَعْفَرٍ، عَنْ حُمَيْدٍ، أَنَّهُ سَمِعَ أَنَسًا ـ رضى الله عنه ـ يَقُولُ كَانَ رَسُولُ اللَّهِ صلى الله عليه وسلم يُفْطِرُ مِنَ الشَّهْرِ، حَتَّى نَظُنَّ أَنْ لاَ يَصُومَ مِنْهُ، وَيَصُومُ حَتَّى نَظُنَّ أَنْ لاَ يُفْطِرَ مِنْهُ شَيْئًا، وَكَانَ لاَ تَشَاءُ تَرَاهُ مِنَ اللَّيْلِ مُصَلِّيًا إِلاَّ رَأَيْتَهُ، وَلاَ نَائِمًا إِلاَّ رَأَيْتَهُ. وَقَالَ سُلَيْمَانُ عَنْ حُمَيْدٍ أَنَّهُ سَأَلَ أَنَسًا فِي الصَّوْمِ.
also referenced under: Book 30, Hadith 79 (In-Book) & Volume 3, Book 31, Hadith 193 (USC-MSA)