Sahih Bukhari – Hadith No : 1972

Narrated Anas: Allah’s Apostle 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.

Hadith In Arabic Text :

حدثني عبد العزيز بن عبد الله، قال حدثني محمد بن جعفر، عن حميد، أنه سمع أنسا رضى الله عنه يقول كان رسول الله صلى الله عليه وسلم يفطر من الشهر، حتى نظن أن لا يصوم منه، ويصوم حتى نظن أن لا يفطر منه شيئا، وكان لا تشاء تراه من الليل مصليا إلا رأيته، ولا نائما إلا رأيته‏.‏ وقال سليمان عن حميد أنه سأل أنسا في الصوم‏.‏

Chapter : Fasting – كتاب الصوم