May I suggest that you also look at the research on sleep cycles as well. When I take melatonin, each cycle appears to be longer and deeper (I have an app that gives a rough estimate) and if I wake up in the middle of a deep cycle, I'm groggy much of the day. This happens without melatonin as well of course, but not as much.
Getting up when the body wakes to go to the bathroom (assuming it's just a little before the alarm goes off) or sleeping just a little longer does wonders. There are a few of apps that will help find the right cycle length for you. Good luck!