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)
USC-MSA web (English) reference: Vol. 6, Book 60, Hadith 10
Arabic reference: Book 65, Hadith 4483