It is narrated from Sayyiduna Mu'awiyah (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: "The eyes are the drawstring of the anus; when the eye sleeps, the drawstring is loosened."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الطهارة / 579