Abu Dawud Book 1, Hadith Number 221.
Chapter : Permissiblity of sleeping before taking bath for a person who is sexualy defiled.
Narated By ‘Abd Allah b. ‘Umar : ‘Umar b. al-Khattab said to the Apostle of Allah (may peace be upon him) that he became sexually defiled at night (asking him what he should do). The Apostle of Allah (may peace be upon him) said: You should perform ablution and wash your penis and then sleep.
ÂÂ