Al Bara’ (bin Azib) said “When a man fasted and slept, he could not eat till (another nigh) like it.” Sarmah bin Qais Al Ansari came to his wife while he was fasting and asked her Do you have something (to eat)? She replied “No”. Let me go and seek something for you. So, she went out and sleep overcame him. She came (back) and said (to him) .You are deprived (of food). He fainted before noon. He used to work all day long at his land. This was mentioned to the Prophet (ﷺ). So the following verse was revealed. “Permitted to you on the nights of the fasts, is the approach to your wives. They are your garments and ye are their garments. Allah knoweth what yes used to do secretly amongst yourselves. But he turned to you and forgave you. So now associate with them and seek what Allaah hath ordained for you. And eat and drink until the white thread of dawn appears to you. He recited up to the words “of dawn”.
The Messenger of Allah (ﷺ) prohibited perpetual fasting. They (the people) said: You keep perpetual fasting, Messenger of Allah. He said: My position is not like that you yours. I am provided with food and drink.
When the deputation of ‘Abd al-Qais came to the Messenger of Allah (May peace be upon him), he commanded them to believe in Allah. He asked : Do you know what faith in Allah is? They replied : Allah and his Apostle know best. He said: It includes the testimony that there is no god but Allah, and that Muhammad is Allah’s Apostle, the observance of the prayer, the payment of zakat, the fasts of Ramadan, and your giving a fifth of the booty.