Aisha reported: If the Messenger of Allah, peace and blessings be upon him, was in spiritual retreat in the mosque (al-I’tikaf), he would tilt his head towards me and I would comb his hair. He would not enter the house except for the need to relieve himself.
Source: Ṣaḥīḥ al-Bukhārī 1925, Ṣaḥīḥ Muslim 297
Grade: Muttafaqun Alayhi (authenticity agreed upon) according to Al-Bukhari and Muslim
Ibn Qudamah said, “There is no difference of opinion that one may leave spiritual retreat in the mosque for something he must do.”
Source: al-Mughnī 3/68
عَنْ عَائِشَةَ قَالَتْ وَإِنْ كَانَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ إِذَا اعْتَكَفَ يُدْنِي إِلَيَّ رَأْسَهُ فَأُرَجِّلُهُ وَكَانَ لَا يَدْخُلُ الْبَيْتَ إِلَّا لِحَاجَةِ الْإِنْسَانِ
1925 صحيح البخاري كتاب الاعتكاف باب لا يدخل البيت إلا لحاجة
297 صحيح مسلم كتاب الحيض باب جواز غسل الحائض رأس زوجها وترجيله وطهارة سؤرها والاتكاء في حجرها وقراءة القرآن فيه
وقال ابن قدامة وَلَا خِلَافَ فِي أَنَّ لَهُ الْخُرُوجَ لِمَا لَا بُدَّ لَهُ مِنْهُ
3/68 المغني لابن قدامة كتاب الاعتكاف مسألة المعتكف ليس له الخروج من معتكفه