Sahih Muslim 1109
Sahih Muslim · Book 13: The Book of Fasting · The fasting is valid for the one who is Junub when dawn comes
Sulaiman b. Yasar reported that he asked Umm Salama whether a person (who gets up) in the morning in a state of junub should observe fast. She said:
حَدَّثَنَا أَحْمَدُ بْنُ عُثْمَانَ النَّوْفَلِيُّ ، حَدَّثَنَا أَبُو عَاصِمٍ ، حَدَّثَنَا ابْنُ جُرَيْجٍ ، أَخْبَرَنِي مُحَمَّدُ بْنُ يُوسُفَ ، عَنْ سُلَيْمَانَ بْنِ يَسَارٍ ، أَنَّهُ سَأَلَ أُمَّ سَلَمَةَ - رضى الله عنها - عَنِ الرَّجُلِ يُصْبِحُ جُنُبًا أَيَصُومُ قَالَتْ كَانَ رَسُولُ اللَّهِ صلى الله عليه وسلم يُصْبِحُ جُنُبًا مِنْ غَيْرِ احْتِلاَمٍ ثُمَّ يَصُومُ .
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.