Eh, I've found my insomnia to be largely independent of the amount of exercise I get. I can run 5 km during the day and still only manage 3-4 hours the next night.
The key was “regular exercise”. It’s not as simple as exercising once and having insomnia cured immediately for that night.
It’s about lifestyle changes and adaptation to those changes over long periods.
I have a regular exercise routine I do every day. Believe it or not some people still have insomnia even when they follow all the usual lifestyle advise.
I find that I actually sleep worse the night I've worked out (3x / week)