The Messenger of Allah (ﷺ) (at times) got up in the morning in a state of junub, not because of sexual dreams (but on account of intercourse at night), and then observed fast.
Sahih Muslim Book 13, Hadith 100
← Previous Hadith
Messenger of Allah, (the time) of prayer overtakes me as I am in a state of junub; should I observe fast (in this state)? Upon this the Messenger of Allah (ﷺ) said: (At times the time) of prayer overtakes me while I am in a state of junub, and I observe fast (in that very state), whereupon he said: Messenger of Allah, you are not like us Allah has pardoned all your sins, the previous ones and the later ones. Upon this he (the Holy Prophet) said: By Allah, I hope I am the most God-fearirg of you, and possess the best knowledge among you of those (things) against which I should guard.
Sahih Muslim Book 13, Hadith 99 Next Hadith → Messenger of Allah, I am undone. He (the Holy Prophet) said: What has brought about your ruin? He said: I have had intercourse with my wife during the month of Ramadan. Upon this he (the Holy prophet) said: Can you find a slave to set him free? He said: NO He (the Prophet again) said: Can you observe fast for two consecutive months? He said: No. He (the Holy Prophet) said: Can you provide food to sixty poor people?, He said: No. He then sat down and (in the meanwhile) there was brought to the Messenger of Allah (ﷺ) a basket which contained dates. He (the Holy Prophet) said: Give these (dates) in charity. He (the man) said: Am I to give to one who is poorer than I? There is no family poorer than mine between the two lava plains of Medina. The Apostle of Allah (ﷺ) laughed so that his molar teeth became visible and said: Go and give it to your family to eat.
Sahih Muslim Book 13, Hadith 101
Sahih Muslim Book 13, Hadith 99 Next Hadith → Messenger of Allah, I am undone. He (the Holy Prophet) said: What has brought about your ruin? He said: I have had intercourse with my wife during the month of Ramadan. Upon this he (the Holy prophet) said: Can you find a slave to set him free? He said: NO He (the Prophet again) said: Can you observe fast for two consecutive months? He said: No. He (the Holy Prophet) said: Can you provide food to sixty poor people?, He said: No. He then sat down and (in the meanwhile) there was brought to the Messenger of Allah (ﷺ) a basket which contained dates. He (the Holy Prophet) said: Give these (dates) in charity. He (the man) said: Am I to give to one who is poorer than I? There is no family poorer than mine between the two lava plains of Medina. The Apostle of Allah (ﷺ) laughed so that his molar teeth became visible and said: Go and give it to your family to eat.
Sahih Muslim Book 13, Hadith 101