(115) باب خُرُوجِ النِّسَاءِ لِحَوَائِجِهِنَّ
Narrated `Aisha:
Once Sa`da bint Zam`a went out at night for some need, and `Umar saw her, and recognizing her, he said (to her), "By Allah, O Sa`da! You cannot hide yourself from us." So she returned to the Prophet (ﷺ) and mentioned that to him while he was sitting in my dwelling taking his supper and holding a bone covered with meat in his hand. Then the Divine Inspiration was revealed to him and when that state was over, he (the Prophet (ﷺ) was saying: "O women! You have been allowed by Allah to go out for your needs."
Reference: Sahih al-Bukhari 5237
In-book reference: Book 67, Hadith 170
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 7, Book 62, Hadith 164