Sahih al-Bukhari, Book 65, Hadith 4483 (In-Book)

Narrated Anas: `Umar said, "I agreed with Allah in three things," or said, "My Lord agreed with me in three things. I said, 'O Allah's Messenger! Would that you took the station of Abraham as a place of prayer.' I also said, 'O Allah's Messenger! Good and bad persons visit you! Would that you ordered the Mothers of the believers to cover themselves with veils.' So the Divine Verses of Al-Hijab (i.e. veiling of the women) were revealed. I came to know that the Prophet had blamed some of his wives so I entered upon them and said, 'You should either stop (troubling the Prophet ) or else Allah will give His Apostle better wives than you.' When I came to one of his wives, she said to me, 'O `Umar! Does Allah's Messenger haven't what he could advise his wives with, that you try to advise them?' " Thereupon Allah revealed:-- "It may be, if he divorced you (all) his Lord will give him instead of you, wives better than you Muslims (who submit to Allah).." (66.5)

حَدَّثَنَا مُسَدَّدٌ، عَنْ يَحْيَى بْنِ سَعِيدٍ، عَنْ حُمَيْدٍ، عَنْ أَنَسٍ، قَالَ قَالَ عُمَرُ وَافَقْتُ اللَّهَ فِي ثَلاَثٍ ـ أَوْ وَافَقَنِي رَبِّي فِي ثَلاَثٍ ـ قُلْتُ يَا رَسُولَ اللَّهِ، لَوِ اتَّخَذْتَ مَقَامَ إِبْرَاهِيمَ مُصَلًّى وَقُلْتُ يَا رَسُولَ اللَّهِ يَدْخُلُ عَلَيْكَ الْبَرُّ وَالْفَاجِرُ، فَلَوْ أَمَرْتَ أُمَّهَاتِ الْمُؤْمِنِينَ بِالْحِجَابِ فَأَنْزَلَ اللَّهُ آيَةَ الْحِجَابِ قَالَ وَبَلَغَنِي مُعَاتَبَةُ النَّبِيِّ صلى الله عليه وسلم بَعْضَ نِسَائِهِ، فَدَخَلْتُ عَلَيْهِنَّ قُلْتُ إِنِ انْتَهَيْتُنَّ أَوْ لَيُبَدِّلَنَّ اللَّهُ رَسُولَهُ صلى الله عليه وسلم خَيْرًا مِنْكُنَّ‏.‏ حَتَّى أَتَيْتُ إِحْدَى نِسَائِهِ، قَالَتْ يَا عُمَرُ، أَمَا فِي رَسُولِ اللَّهِ صلى الله عليه وسلم مَا يَعِظُ نِسَاءَهُ حَتَّى تَعِظَهُنَّ أَنْتَ فَأَنْزَلَ اللَّهُ ‏{‏عَسَى رَبُّهُ إِنْ طَلَّقَكُنَّ أَنْ يُبَدِّلَهُ أَزْوَاجًا خَيْرًا مِنْكُنَّ مُسْلِمَاتٍ‏}‏ الآيَةَ‏.‏ وَقَالَ ابْنُ أَبِي مَرْيَمَ أَخْبَرَنَا يَحْيَى بْنُ أَيُّوبَ حَدَّثَنِي حُمَيْدٌ سَمِعْتُ أَنَسًا عَنْ عُمَرَ.

sunnah.com