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.
Sunan Ibn Majah Book 1, Hadith 320