Bulugh al-Maram
Bulugh al-Maram 80
وَعَنْ مُعَاوِيَةَ - رضى الله عنه - قَالَ: قَالَ رَسُولُ اَللَّهِ - صلى الله عليه وسلم -{ الْعَيْنُ وِكَاءُ السَّهِ, فَإِذَا نَامَتْ اَلْعَيْنَانِ اِسْتَطْلَقَ اَلْوِكَاءُ } رَوَاهُ أَحْمَدُ, وَالطَّبَرَانِيُّ وَزَادَ { وَمَنْ نَامَ فَلْيَتَوَضَّأْ }
Mu‘awiyah (may Allah be pleased with him) reported that the Messenger of Allah (peace and blessings be upon him) said: ‘The eye is the tether of the anus; when the two eyes sleep, the tether is released.’ Ahmad and al-Tabarani reported it, and al-Tabarani added: ‘Whoever sleeps should perform ablution.’
Translation notes
The wording uses a metaphor: the eye is likened to a tether that restrains the anus; when a person sleeps, that restraint is released. The English witness supplies an explanatory gloss about air escaping.