All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Ghusl (ritual bath) is a must for one who has had a discharge of Mani (Sperm) owing to stimulation while asleep or awake.
Abu Sa’eed Al-Khudri reported that he heard the Prophet
saying: “(Ghusl (ritual bath) is obligatory after ejaculation of sperm.” Umm Salamah reported that Umm Sulaym said. “O Messenger of Allah, Allah is not ashamed of the truth. Does a woman have to perform Ghusl if she has a wet dream?” He
replied: “Yes, if she notices the discharge.” [Al-Bukhari and Muslim].
Allah knows best.