Hadithcore
Sunan Ibn Majah, 1704
sahih· Darussalam

It was narrated that Nafi’ said:

“I asked Umm Salamah about a man who gets up in the morning when he is in a state of sexual impurity and wants to fast. She said: “The Messenger of Allah (ﷺ) used to get up in the morning in a state of sexual impurity after having intercourse, not from a wet dream, then he would take a bath and complete his fast.’”

حَدَّثَنَا عَلِيُّ بْنُ مُحَمَّدٍ، حَدَّثَنَا عَبْدُ اللَّهِ بْنُ نُمَيْرٍ، عَنْ عُبَيْدِ اللَّهِ، عَنْ نَافِعٍ، قَالَ سَأَلْتُ أُمَّ سَلَمَةَ عَنِ الرَّجُلِ، يُصْبِحُ، وَهُوَ جُنُبٌ، يُرِيدُ الصَّوْمَ؟ قَالَتْ: كَانَ رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ يُصْبِحُ جُنُبًا مِنَ الْوِقَاعِ، لاَ مِنِ احْتِلاَمٍ، ثُمَّ يَغْتَسِلُ وَيُتِمُّ صَوْمَهُ ‏.‏

References2 variants
In-Book Reference
Book 7, Hadith 67
English Reference
Vol. 1, Book 7, Hadith 1704