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.
ahmad:26408ʿĀmir b. Ṣāliḥ > Mālik b. Anas > Ibn Shihāb > ʿUrwah > ʿAmrah > ʿĀʾishah

[Machine] She said, "The Messenger of Allah, ﷺ , used to stay in seclusion (i'tikaf) in the mosque and would not leave except for human needs."  

أحمد:٢٦٤٠٨وَجَدْتُ فِي كِتَابِ أَبِي حَدَّثَنَا عَامِرُ بْنُ صَالِحٍ قَالَ حَدَّثَنِي مَالِكُ بْنُ أَنَسٍ عَنِ ابْنِ شِهَابٍ عَنْ عُرْوَةَ عَنْ عَمْرَةَ عَنْ عَائِشَةَ

أَنَّهَا قَالَتْ كَانَ رَسُولُ اللهِ ﷺ إِذَا اعْتَكَفَ لَمْ يَخْرُجْ مِنَ الْمَسْجِدِ إِلَّا لِحَاجَةِ الْإِنْسَانِ  


See similar narrations below:

Collected by Ibn Ḥibbān

ذِكْرُ السَّبَبِ الَّذِي مِنْ أَجْلِهِ يَدْخُلُ الْمُعْتَكِفُ بَيْتَهُ فِي اعْتِكَافِهِ

ibnhibban:3672ʿUmar b. Saʿīd b. Sinān > Aḥmad b. Abū Bakr > Mālik > Ibn Shihāb > ʿUrwah And ʿAmrah > ʿĀʾishah

When the Messenger of Allah ﷺ observed I'tikaf, he would put his head near me, and I would comb it. and he entered the house only to fulfill human needs (i.e. to urinate or to relieve himself). (Using translation from Abū Dāʾūd 2467)  

ابن حبّان:٣٦٧٢أَخْبَرَنَا عُمَرُ بْنُ سَعِيدِ بْنِ سِنَانٍ قَالَ أَخْبَرَنَا أَحْمَدُ بْنُ أَبِي بَكْرٍ عَنْ مَالِكٍ عَنِ ابْنِ شِهَابٍ عَنْ عُرْوَةَ وَعَمْرَةَ عَنْ عَائِشَةَ

أَنَّهَا قَالَتْ «كَانَ رَسُولُ اللَّهِ ﷺ إِذَا اعْتَكَفَ أَدْنَى إِلَيَّ رَأْسَهُ فَأُرَجِّلُهُ فَكَانَ لَا يَدْخُلُ الْبَيْتَ إِلَّا لِحَاجَةِ الْإِنْسَانِ»