It is narrated from Hazrat Anas (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) would (at times) fast so continuously that people would say the Prophet (peace and blessings be upon him) will now keep fasting, and (at times) would leave fasting so continuously that people would say the Prophet (peace and blessings be upon him) will now not fast.
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 12624