ENOfficial
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.” Darimi transmitted it.
Source: sunnah.com
Other translations
Arabic
وَعَن مُعَاوِيَة بن أبي سُفْيَان أَنَّ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: قَالَ: «إِنَّمَا الْعَيْنَانِ وِكَاءُ السَّهِ فَإِذَا نَامَتِ الْعَيْنُ اسْتطْلقَ الوكاء» . رَوَاهُ الدِّرَامِي
sunnah.com