Usually the man has been dreaming about sex and has an erection because of it. The strange thing is that the man may not even remember having a dream about sex, but still wakes up with an erection. There is a statistic that men think about sex many many times a day ( more than women ).