I have used Melatonin for a year or so on long haul and have found it to be very good. As above I buy it in the health food shops in florida and only ever buy the 1mg size tablets.
It doesn't knock you out but if you plan to sleep before a very anti social duty, then plan a tablet about two hours before requiring sleep and you should find that whatever sleep you would have got will be enhanced.
I find any muzziness goes within an hour of wakeup and recently did a night flight eastbound across the pond feeling very awake and alert. Seemed to wear off at top of descent however which was some 14 hours after wake up so I guess we can't expect too much.
I used the 'CAA advise' ten to twelve years ago when they said that Temazepam and Triazolam were approved for use. I spent the summer seasons of 88 to 90 like a zombie. And we all know how the Halcyon based drugs are viewed now!
Melatonin taken sensibly works well for me and I concur that used more than 12 hours before a flight is safe. However do not go out and buy the 3mg tablets to start with. I had a First Officer who did, and despite my warnings reported for duty looking like a heroin addict in meltdown!