Went through a period of bad insomnia, anxiety etc.
Best things for me were:
1) Exercise but not too close to bed time
2) Sleep meditations on the Insight Timer app
3) Making sure I don't get too hot in the night.
4) Very dark room
5) Headphones/ear plugs to block out sensitivity to every little noise
6) No coffee or alcohol
7) Only relaxing books/shows before bed
For years I was pretty sluggish in the morning and not at my best until had at least two cups of coffee. Then I'd later crash in the evening. After eventually quitting caffeine I realised that all those years of energy levels going up and down during the day was caused by the caffeine itself rather than it being the saviour.
Energy levels much more consistent throughout the day without it. I do miss the routine though and drinking decaf does feel a bit silly.