Anas Radiyallahu 'Anhu reports:
"Someone was asked about the saum of Rasulullah Sallallahu 'Alayhi Wasallam? He replied: 'It was his noble habit to fast on different occasions. In some months he fasted for so many days, that it was thought he would continue fasting. In other months he did not fast, we thought he would not fast now. It was also from his noble habits that if one wanted to observe Rasulullah Sallallahu 'Alayhi Wasallam performed salaah at night, it was possible, and if one wanted to observe Rasulullah Sallallahu 'Alayhi Wasallam sleep at night, this too was possible'".
English reference: Book 42, Hadith 282
Arabic reference: Book 43, Hadith 299