it wont let you sleep if you are still on the trip. ime, it will however help a little bit when you are at the tail end of the comedown to chill down a bit. indeed ive found it does work a little bit better with herbal products (valerian, passion flower), but this will not end your trip, just help you if you are already in a state that allows it.
interesting thing about the potentiation of a trip by melatonin, though i doubt it is anything that powerful, ill look into it