The Prophet ﷺ used to perform itikaf during the last ten days of Ramadan, and I would set up a tent for him. He would pray the dawn prayer and then enter it.Hafsah asked Ayesha for permission to set up a tent of her own, and Ayesha gave her permission, so she set one up. When Zaynab bint Jahsh saw it, she set up another tent.In the morning, the Prophet ﷺ saw the tents and asked, "What are these?" He was told about them.The Prophet ﷺ said, "Is it righteousness you think they are seeking by this?" So he abandoned itikaf that month and instead performed itikaf for ten days in Shawwal.
حدثنا أبو النعمان حدثنا حماد بن زيد حدثنا يحيى عن عمرة
كان النبي ﷺ يعتكف في العشر الأواخر من رمضان فكنت أضرب له خباء فيصلي الصبح ثم يدخله فاستأذنت حفصة عائشة أن تضرب خباء فأذنت لها فضربت خباء فلما رأته زينب ابنة جحش ضربت خباء آخر فلما أصبح النبي ﷺ رأى الأخبية فقال ما هذا فأخبر فقال النبي ﷺ أالبر ترون بهن فترك الاعتكاف ذلك الشهر ثم اعتكف عشرا من شوال