Nocturnal penile tumescence (NPT) refers to penile erection during sleep or immediately upon waking and is a natural process. It can be tested with the help of electrodes, which is a process used to diagnose erectile dysfunction.