Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
nasai-kubra:9023Hannād b. al-Sarī > Abū al-Aḥwaṣ > Manṣūr > Sālim > ʿAlī > Idhā Ajnab al-a man Faʾarād

[Machine] If he wants to sleep or eat, then he should perform ablution, his ablution being for prayer.  

الكبرى للنسائي:٩٠٢٣أَخْبَرَنَا هَنَّادُ بْنُ السَّرِيِّ عَنْ أَبِي الْأَحْوَصِ عَنْ مَنْصُورٍ عَنْ سَالِمٍ عَنْ عَلِيٍّ قَالَ «§إِذَا أَجْنَبَ الرَّجُلُ فَأَرَادَ

أَنْ يَنَامَ أَوْ يَطْعَمَ فَلْيَتَوَضَّأْ وُضُوءَهُ لِلصَّلَاةِ»  


See similar narrations below:

Collected by Suyūṭī
suyuti:1162a

when the prophet ﷺ intended to sleep while he was sexually defiled, he would perform ablution as he did for prayer. (Using translation from Abū Dāʾūd 222)   

السيوطي:١١٦٢a

"إذَا أراد أحدُكم أن ينامَ وهو جُنُبٌ فليتوضأ وضوءَه للصّلاةِ".  

[حم] أحمد عن عائشة