(35) بَاب النَّهْيِ عَنْ صَوْمِ الدَّهْرِ لِمَنْ تَضَرَّرَ بِهِ أَوْ فَوَّتَ بِهِ حَقًّا أَوْ لَمْ يُفْطِرْ الْعِيدَيْنِ وَالتَّشْرِيقَ وَبَيَانِ تَفْضِيلِ صَوْمِ يَوْمٍ وَإِفْطَارِ يَوْمٍ
Abdu'llah b. 'Amr b. 'As (Allah be pleased with them) reported:
It was conveyed to the Messenger of Allah (ﷺ) that I observe fast successively and pray during the whole night. He sent for me or I met him and he (the Holy Prophet) said: It has been conveyed to me that you observe fast continuously and do not break it and pray during the whole night. Don't do that. for there is share for your eyes, share for your own self, share for your family; so observe fast and break it, pray and sleep and observe fast for one day during the ten days, and there is a reward for you (for other) nine (days besides the tenth day of the fast). I said: Apostle of Allah, I find myself more powerful than this. He said: Then observe the fast of David (peace be upon him). He ('Amr) said: Apostle of Allah, how did David observe fast? He (the Holy Prophet) said: He used to fast one day and break it on the other day, and he did not run (from the battlefield) as he encountered (the enemy). He said: Apostle of Allah, who can guarantee this for me (will I also encounter the enemy dauntlessly)? 'Ata', the narrator of the hadith, said: I do not know how there (crept in) the matter of perpetual fast. The Apostle of Allah (ﷺ), however, said: He who observed perpetual fast did not fast at all; he who observed perpetual fast did not fast at all, he who observed perpetual fast did not fast at all.
Reference: Sahih Muslim 1159 f
In-book reference: Book 13, Hadith 240
USC-MSA web (English) reference(deprecated numbering scheme): Book 6, Hadith 2591