Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bukhari:5237Farwah b. Abū al-Maghrāʾ > ʿAlī b. Mushir > Hishām from his father > ʿĀʾishah

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."  

البخاري:٥٢٣٧حَدَّثَنَا فَرْوَةُ بْنُ أَبِي الْمَغْرَاءِ حَدَّثَنَا عَلِيُّ بْنُ مُسْهِرٍ عَنْ هِشَامٍ عَنْ أَبِيهِ عَنْ عَائِشَةَ قَالَتْ

خَرَجَتْ سَوْدَةُ بِنْتُ زَمْعَةَ لَيْلاً فَرَآهَا عُمَرُ فَعَرَفَهَا فَقَالَ إِنَّكِ وَاللَّهِ يَا سَوْدَةُ مَا تَخْفَيْنَ عَلَيْنَا فَرَجَعَتْ إِلَى النَّبِيِّ ﷺ فَذَكَرَتْ ذَلِكَ لَهُ وَهْوَ فِي حُجْرَتِي يَتَعَشَّى وَإِنَّ فِي يَدِهِ لَعَرْقًا فَأُنْزِلَ عَلَيْهِ فَرُفِعَ عَنْهُ وَهُوَ يَقُولُ قَدْ أَذِنَ لَكُنَّ أَنْ تَخْرُجْنَ لِحَوَائِجِكُنَّ