Though sexual intercourse in the state of ihram is prohibited and it does invalidate one’s Hajj, experiencing a wet dream will in no way affect the validity of ihram. Therefore, ihram is not invalidated if pilgrims find their selves in such situation. The late Sheikh SayyedSabiq states: A muhrim [Arabic for: a pilgrim who is in the state of ihram], who had a wet dream or ejaculated by thinking about or looking at a woman, incurs no penalty, according to the Shafi`i school.
Sheikh Ahmad Kutty, a senior lecturer and an Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states,
If you experience a wet dream in Hajj in a state of ihram, you need not worry; since it is beyond your control, it does not invalidate your Hajj; you simply need to perform ghusl (Arabic for: ritual bath in Islam).