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.
English reference: Vol. 1, Book 1, Hadith 586
Arabic reference: Book 1, Hadith 629
Read hadith from the major collections in the app, with prayer times and a Qibla compass. Free.