Hadith 646B4

وَلَمْ أَسْمَعْ أَنَّ الْمُعْتَكِفَ يَضْرِبُ بِنَاءً يَبِيتُ فِيهِ ، إِلَّا فِي الْمَسْجِدِ أَوْ فِي رَحَبَةٍ مِنْ رِحَابِ الْمَسْجِدِ ، وَمِمَّا يَدُلُّ عَلَى أَنَّهُ لَا يَبِيتُ إِلَّا فِي الْمَسْجِدِ ، قَوْلُ عَائِشَةَ كَانَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ " إِذَا اعْتَكَفَ لَا يَدْخُلُ الْبَيْتَ إِلَّا لِحَاجَةِ الْإِنْسَانِ
Imam Malik, may Allah have mercy on him, said: I have not heard that the person observing i'tikaf should set up a tent to stay at night in the mosque or in its courtyard, and this is indicated by the statement of Lady Aisha, may Allah be pleased with her, that the Messenger of Allah, peace and blessings be upon him, when he observed i'tikaf, would not enter the house except for a necessary need.
Hadith Reference موطا امام مالك رواية يحييٰ / كتاب الاعتكاف / 646B4
Hadith Takhrij «شركة الحروف نمبر: 641، فواد عبدالباقي نمبر: 19 - كِتَابُ الِاعْتِكَافِ-ح: 3»