Males often become erect during sleep, for reasons which are not well understood. Erotic dreams, with or without noturnal coming, are clearly not the only reason. Stimulation from friction of bed clothing, periodic autonomic system arousal during sleep, etc have all been suggested as causes.
In a D/s context, a submixxive may be required to deliberately cause an erection during the night so as to provide an opportunity for the Master's use.
However, it may come to be, an erection on awakening is often called morning wood.