Nocturnal erections occur during REM sleep. In a normal sleep cycle REM occurs mostly between 4 AM and about 7 AM. These erections occur via the parasympathetic nervous system, rather than the sympathetic. One function of the sympathetic system is to continually inhibit erections. (Good safety reasons for this: during the day when we’re out gathering food or hunting in the woods, erections would get in the way or could get injured more easily than if we were flaccid; I would guess that social prohibitions would factor in here, too - in how the sympathetic nervous system evolved.). During REM sleep, the sympathetic nervous system is “turned off” and so nocturnal erections occur more or less spontaneously.
As Haha said, there are lots of reasons why yours could shift. Take a look at your PE routine. Are you maybe overstressing your cock? Also, it is very possible that you are for some reason now waking more slowly out of REM sleep than you were. The REM stage fades off, the erection fades, too, but you are not quite awake yet when that happens. When you do wake part of that particular erection cycle is already complete.
It is also very common that life stresses diminish the natural cycle. Take a look at how your life is going right now. Any major issues?
It is also very normal for all of us to go through periods, even of a couple weeks, when morning wood just isn’t there like usual. Don’t worry about this unless you are waking up flaccid over a long period of time. If you wake with a partial, odds are that you had several very firm erections previously that night and just weren’t aware of them.
Yes, hormonal levels play a part in the nocturnal erection cycle (4 - 5 each night, lasting about a half hour each). However, the odds are very much in your favor if you are relatively young that you don’t have a hormonal problem; the odds are still in your favor that the problem is not hormonal if you are middle-aged. Hormonal insufficiency or imbalance is not a common factor in erectile dysfunction.