Onset of morning wood may be a non sexual autonomic thing, but Iwhen it happens at a time when you aee likely to wake up, I suspect that the sensations of penis againsty bed sheets may be a catalyst to wake up, and from then on, the sensation of erect penis becomes sexual and the brain contributes to keeping the erection,
In my case, if lying on my back, it is not just the glans agianst bedsheets, but also the sesnation of tight shaft skin. I'll often put finger on shaft to try to move skin to feel its tightness that that makes erection stronger.
On other hand, if I am on my side, the penis may be hard, but won't realy rub against bedsheets and in that position, the shaft skin doesn't feel tight, and it tends to remain an annoyance and not become sexual.