What causes penile erection at night?

My 64 years old uncle gets up in the middle of the night with penile erection. There is no pain. What causes penile erection at night?

 

Nightime erections are extremely common at all ages and are benign. They usually don't require any treatment unless they last longer than an hour and are painful. They are more common and happen more frequently in young men but can happen up to 2-3 times a night in elderly men. Penile erections are more common during REM sleep (a phase of sleep where vividly recalled dreams occur).