This is good advice. Taking melatonin when you go to bed will help you sleep, but taking it a few hours before you want to go to bed helps retrain your circadian cycle (which is the goal, not just going to sleep easily)
Do you have a source you can cite for this? I'm keenly interested in how this works.