The Messenger of Allah ﷺ mentioned that he intended to perform spiritual seclusion during the last ten days of Ramadan. Ayesha asked his permission to join him in seclusion, and he granted it. She then ordered her tent to be set up, and it was pitched.Hafsa asked Ayesha to seek the Messenger of Allah's ﷺ permission for her as well, and she did so. Hafsa then ordered her tent to be set up, and it was pitched.When Zaynab saw this, she ordered her own tent to be set up, and it was pitched.Ayesha said, "Whenever the Messenger of Allah ﷺ finished his prayer, he would leave, and he noticed the tents."He asked, "What are these?"They replied, "The tents of Ayesha, Hafsa, and Zaynab."The Prophet ﷺ said, "Was it righteousness you sought by this? I will not perform seclusion."So he returned home, and when he had broken his fast, he performed the seclusion during ten days of Shawwal instead.
قال حدثني أبو المغيرة قال حدثنا الأوزاعي قال حدثني يحيى بن سعيد قال حدثتني عمرة بنت عبد الرحمن
أن رسول الله ﷺ ذكر أن يعتكف العشر الأواخر من رمضان فاستأذنته عائشة فأذن لها فأمرت ببنائها فضرب وسألت حفصة عائشة أن تستأذن لها رسول الله ﷺ ففعلت فأمرت ببنائها فضرب فلما رأت ذلك زينب أمرت ببنائها فضرب قالت وكان رسول الله ﷺ إذا صلى انصرف فبصر بالأبنية فقال ما هذه قالوا بناء عائشة وحفصة وزينب فقال النبي ﷺ آلبر أردتن بهذا ما أنا بمعتكف فرجع فلما أفطر اعتكف عشر شوال
Its chain of transmission is sahih. Bukhari narrated it 4/275 no. 2033 (Fath), Muslim 2/831 no. 1173, and Malik 1/316 no. 7, all in the chapter on itikaf. Abu Dawud narrated it 2/331 no. 2464, Tirmidhi 3/148 no. 791, and Ibn Majah 1/563 no. 1771, all in the chapter on fasting. Nasai narrated it 2/44 no. 709 in the chapter on mosques, and Humaydi 1/99 no. 195.