I've tried melatonin, cutting out alcohol, f.lux, not looking at a screen for an hour before bed, but the one thing that has had the most influence on my sleep (for the better) is cutting out caffeine after 4pm. (relevant study: http://www.aasmnet.org/jcsm/ViewAbstract.aspx?pid=29198)
this. if you race your mind whole day in highest gear, tired body helps a lot to drag it into abyss of good old hard sleep. plus gazillion other positive effects, if all is done right
melatonin supplements only go so far.
f.lux is indeed awesome.
4pm seems a bit late for me but he has a good point.
Also exercise helps a lot ! unfortunately, it also requires the most effort.
Cut out caffeine a minimum 6 hours before one sleeps. Fun factoid: caffeine's half life is around 6 hours, and by then one is pretty much over all of its effects.