Exercising less than 3hours prior bedtime can keep you awake. So try to do it earlier or in the morning.
Your Ultimate Guide For Waking Up Early
Zdravko Cvijetic

However it can be a good choice if you are not sleeping in my experience.

Some times my mind is racing and I can’t get it to settle down. A conversation I want to have desperately, a conversation I had that went sideways and it’s bothering me like crazy..Etc.

Also I find it hard in the moment to decide; is my sleeplessness a big problem right now that requires something to totally divert my thinking or a small problem that requires me to remain calm and wait it out e.g. 10-15min and I’m sleeping happily. For me that’s the hardest part, because if I ran every time then I’d be losing sleep by the bundle and I’d be screwed.

Ps. When I run, I don’t run hard as I’m also keenly aware that getting my heart pumping will be counter productive too. Such a balance!! Arghh