It is narrated from Sayyidah Aishah (may Allah be pleased with her) that "when the Prophet (peace and blessings be upon him) was in i'tikaf, he would not go out (of the mosque) except for an unavoidable need that could not be done without."
Muhammad bin Yahya bin Abi Umar recorded it with a chain that includes the narrator Abdullah bin Budayl al-Khuza'i.