Dreaming about sex (also called nocturnal emissions or wet dreams) is not directly harmful to the body. It is a normal physiological phenomenon, especially during the deep stages of sleep, such as the rapid eye movement (REM) phase. In these cases, the body and brain naturally produce sexual responses, which may bring pleasure and release.
From a psychological perspective, sexual dreams can reflect unconscious desires and may help release some emotional tension. In this sense, they could be beneficial for mental health. However, they are different from actual sexual experiences, and the pleasure felt in a dream does not affect physical health.