Morning erections are rarely because of arousal. Oddly, the arousal follows after the erection.
After some research, this Nocturnal Penile Tumescence (NPT) is most likely our body's ways of exercising and maintaining the neural and arterial system that allows erections to happen. they are linked to REM cycles and happen 2-3 times a night. My wife can attest to that. I've woken up in the middle of the night to her poking, giggling and shaking her head at the tent in the bed sheets! She would always ask, "What are you dreaming about?" and I would honestly answer "Nothing. Really". Of course, I'd add, "Well, now that you woke me up...". She'd just shake her head, roll over and go back to sleep. Cruel. Haha.
Others say that it's just nature's way of encouraging procreation. But I don't buy that at all. If nature had really wanted that, they would have had women wake up wet and engorged. Because, as we all know, what momma wants, momma gets. If the tables were turned, what man would say "No" to that, like women usually do?!?!