The way a person feels when waking up from sleep, day or night, depends largely on the sleep stage the person was in just before waking up.
This “sleep inertia” affects how someone feels for a little while after waking.
Waking from what is called slow-wave sleep, a deep sleep without rapid eye movement, a person is very likely to feel groggy, but one is much less likely to feel groggy when emerging from rapid-eye-movement sleep or one of the lighter non-REM stages.
Other factors that may rum the morning include:
major depression, in which people feel much worse in the morning and better as the day goes on;
severe obstructive sleep apnea, or failure to breathe when sleeping, which means sleep is constantly though unconsciously interrupted by waking to resume breathing;
and the use of sleeping pills that are still working in the morning.
Even extra sleep can leave a person tired if it represents a failed effort to make up for lost sleep.
We have no way of controlling what stage we awaken from but all of the other problems are treatable disorders.