كتاب السلام
39  
The Book of Greetings
(7)
Chapter: The Permissibility Of Women Going Out To Relieve Themselves
(7)
باب إِبَاحَةُ الْخُرُوجِ لِلنِّسَاءِ لِقَضَاءِ حَاجَةِ الإِنْسَانِ ‏‏
Sahih Muslim 2170 d

'A'isha reported that the wives of Allah's Messenger (ﷺ) used to go out in the cover of night when they went to open fields (in the outskirts of Medina) for easing themselves. 'Umar b Khattab used to say:

Allah's Messenger, ask your ladies to observe veil, but Allah's Messenger (ﷺ) did not do that. So there went out Sauda, daughter of Zarn'a, the wife of Allah's Messenger (ﷺ), during one of the nights when it was dark. She was a tall statured lady. 'Umar called her saying: Sauda, we recognise you. (He did this with the hope that the verses pertaining to veil would be revealed.) 'A'isha said: Allah, the Exalted and Glorious, then revealed the verses pertaining to veil.
حَدَّثَنَا عَبْدُ الْمَلِكِ بْنُ شُعَيْبِ بْنِ اللَّيْثِ، حَدَّثَنِي أَبِي، عَنْ جَدِّي، حَدَّثَنِي عُقَيْلُ بْنُ، خَالِدٍ عَنِ ابْنِ شِهَابٍ، عَنْ عُرْوَةَ بْنِ الزُّبَيْرِ، عَنْ عَائِشَةَ، أَنَّ أَزْوَاجَ، رَسُولِ اللَّهِ صلى الله عليه وسلم كُنَّ يَخْرُجْنَ بِاللَّيْلِ إِذَا تَبَرَّزْنَ إِلَى الْمَنَاصِعِ وَهُوَ صَعِيدٌ أَفْيَحُ وَكَانَ عُمَرُ بْنُ الْخَطَّابِ يَقُولُ لِرَسُولِ اللَّهِ صلى الله عليه وسلم احْجُبْ نِسَاءَكَ ‏.‏ فَلَمْ يَكُنْ رَسُولُ اللَّهِ صلى الله عليه وسلم يَفْعَلُ فَخَرَجَتْ سَوْدَةُ بِنْتُ زَمْعَةَ زَوْجُ النَّبِيِّ صلى الله عليه وسلم لَيْلَةً مِنَ اللَّيَالِي عِشَاءً وَكَانَتِ امْرَأَةً طَوِيلَةً فَنَادَاهَا عُمَرُ أَلاَ قَدْ عَرَفْنَاكِ يَا سَوْدَةُ ‏.‏ حِرْصًا عَلَى أَنْ يُنْزِلَ الْحِجَابَ ‏.‏ قَالَتْ عَائِشَةُ فَأَنْزَلَ اللَّهُ عَزَّ وَجَلَّ الْحِجَابَ ‏.‏
Reference : Sahih Muslim 2170d
In-book reference : Book 39, Hadith 25
USC-MSA web (English) reference : Book 26, Hadith 5397
  (deprecated numbering scheme)