Mu'awiya b. Abu Sufyan reported the Prophet as saying, “The eyes are the leather strap of the anus, and when the eye sleeps the leather strap is loosened.”
‘Ali b. Talq reported God’s messenger as saying, “When any of you breaks wind he should perform ablution, and you must not have intercourse with women by their buttocks.”
‘Ali reported God's messenger as saying, “The leather strap of the anus is the eyes, so one who sleeps should perform ablution.
Abu Dawud transmitted it, and the shaikh and imam Muhyi as-Sunna said that this does not refer to one who is sitting because of the
sound tradition from Anas who said that the Companions of God’s messenger dozed while waiting for nightfall, then prayed without performing ablution.
Abu Dawud and Tirmidhi transmitted it, but Tirmidhi said “they slept” instead of saying that they “dozed while waiting for nightfall.”
He also reported God's messenger as saying, “The key of prayer is purification, saying ‘God is most great’ makes it a sacred state, and the salutation brings the sacred state to an end.”
Abu Dawud, Tirmidhi and Darimi transmitted it, and Ibn Majah transmitted it both from 'Ali and from Abu Sa'id.