I have started meditation with one of the aims being to improve my sleep. I still have problems sleeping, but it helps a lot when you are able to let thoughts go without ruminating on them.
I like to think of meditation as garbage collection for the brain. If you don't do it at a specific time to suit you, your brain will do it at the only time it's idle (when you're trying to fall asleep)