'Umar bin Khattab said to the Messenger of Allah: "can anyone of us sleep if he is sexually impure?" He said: "Yes, if he performs ablution."
Sunan Ibn Majah Book 1, Hadith 319