Nocturnal penile tumescence

Nocturnal penile tumescence (abbreviated as NPT) is a spontaneous erection of the penis during sleep or when waking up. All men without physiological erectile dysfunction experience nocturnal penile tumescence, usually three to five times during the night, typically during REM sleep. NPTs are believed to contribute to penile health.

Diagnostic value
The existence and predictability of nocturnal tumescence is used by sexual health practitioners to ascertain whether a given case of erectile dysfunction (E.D.) is psychological or physiological in origin. A patient presenting with E.D. is fitted with an elastic device to wear around his penis during sleep; the device detects changes in girth and relays the information to a computer for later analysis. If nocturnal tumescence is detected, then the E.D. is presumed to be due to a psychosomatic illness such as sexual anxiety; if not, then it is presumed to be due to a physiological cause.

Mechanism
The cause of NPT is not known with certainty. Bancroft (2005) hypothesizes that the noradrenergic neurons of the locus ceruleus are inhibitory to penile erection, and that the cessation of their discharge that occurs during REM sleep may allow testosterone-related excitatory actions to manifest as NPT.

Evidence supporting the possibility that a full bladder can stimulate an erection has existed for some time and is characterized as a 'reflex erection'. The nerves that control a man’s ability to have a reflex erection are located in the sacral nerves (S2-S4) of the spinal cord. A full bladder is known to mildly stimulate nerves in the same region.

The possibility of a full bladder causing an erection, especially during sleep, is perhaps further supported by the beneficial physiological effect of an erection inhibiting urination, thereby helping to avoid nocturnal enuresis.

In popular culture
Research into the causes of NPT was the subject of "The Mystery of Morning Wood", a 1995 episode of the animated comedy series Beavis and Butt-head.