I would agree about melatonin, but I've never taken it regularly, only when I'm going to be facing jet lag. Maybe I should start taking it daily.
I've had insomnia all my life and I've found the only thing to do is to stop fighting it. When I'm faced with it, I try to do something productive. It doesn't help with the tiredness the next day, though I generally don't feel that, but it completely evaporates the frustration, and I get a lot of stuff done I might otherwise need to stay up late the next day and do.