Sunan Ibn Majah, Book 1, Hadith 629 (In-Book) ⓘ
It was narrated from Abu Sa'eed Khudri that: He used to become sexually impure at night, then he would want to sleep. The Messenger of Allah told him to perform ablution and then go to sleep.
حَدَّثَنَا أَبُو مَرْوَانَ الْعُثْمَانِيُّ، مُحَمَّدُ بْنُ عُثْمَانَ حَدَّثَنَا عَبْدُ الْعَزِيزِ بْنُ مُحَمَّدٍ، عَنْ يَزِيدَ بْنِ عَبْدِ اللَّهِ بْنِ الْهَادِ، عَنْ عَبْدِ اللَّهِ بْنِ خَبَّابٍ، عَنْ أَبِي سَعِيدٍ الْخُدْرِيِّ، أَنَّهُ كَانَ تُصِيبُهُ الْجَنَابَةُ بِاللَّيْلِ فَيُرِيدُ أَنْ يَنَامَ فَأَمَرَهُ رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ أَنْ يَتَوَضَّأَ ثُمَّ يَنَامَ .
also referenced under: Hadith 586 (Reference) & Volume 1, Book 1, Hadith 586 (DarusSalam)