Umm Sulaym came to the Messenger of Allah ﷺ and said, "Messenger of Allah, Allah is not shy of the truth. Does a woman have to perform a ritual bath if she has a wet dream?"The Prophet ﷺ replied, "Yes, if she sees the fluid."Umm Salama covered her face and said, "Messenger of Allah, does a woman have wet dreams?"He said, "Yes, may your right hand be dusty. How else would her child resemble her?"
جاءت أم سليم إلى رسول الله ﷺ فقالت: يا رسول الله، إن الله لا يستحيي من الحق، فهل على المرأة من غسل إذا احتلمت؟ قال النبي ﷺ: إذا رأت الماء. فغطت أم سلمة- تعني وجهها- وقالت: يا رسول الله، وتحتلم المرأة؟ قال: نعم، تربت يمينك، ففيم يشبهها ولدها؟
Bukhari narrated it in the Book of Knowledge (130), and Muslim in the Book of Menstruation (313), both through Abu Muawiya, from Hisham bin Urwa, from his father, from Zaynab, and he mentioned it.