14-18yo I went to the gym 1hr/day every weekday, boxing 1-2hrs 3x/wk, karate 1hr 2x/wk.
18yo+ I've boxed, run 30-40 miles/wk (some 3/4hr runs in there too leading up to ultras), climbed 2-10hrs/wk, and gym 2-3x/wk for the last 5 years although that schedule and activity level has varied since I have no real reason to kill myself training now that I don't compete in anything.
None of the above have an impact on sleep or ability to fall asleep, I have taken weeks off due to injury or months off due to burnout after a 12hr race, and my sleep schedule hasn't changed. Still tired-ish around 5-7, then 7-2am find it impossible to fall asleep, followed by 5-6hrs sleep and repeat. I 100% agree with the guy who replied to you that got heavily downvoted that "just exercise" is a vastly oversimplified response to the complex issues most people have with sleep. Not everybody's sleep issues are due to an inactive lifestyle, and I'd bet that is not the case for the majority of people.
I can still feel the adrenaline and elevated heart rate and body temperature that just makes it even more difficult to fall asleep so I have no idea how people who go to the gym at 9PM manage to fall asleep. I wish I knew their secret or had their genetics.
Lighter exercises that don't stress the body, like long walks and yoga are much better for sleeping but not good for building muscle.
My problem isn't falling asleep, it's staying asleep for long enough to feel rested. I usually wake up after 4-5h and can't easily fall back to sleep. By the time I get sleepy again(7-8AM) it's already morning and time to get up for work.
So far I haven't found a (natural) cure for this. There's medication that aids with getting long sleep but the side effects (drowsy ness and brain fog) are nearly just as bad as the lack of sleep.
I also find white noise and a sleep mask have helped a fair bit. I’m a very light sleeper so little background noises wake me easily, so having white noise on helps there. And wearing a sleep mask notably improved my sleep as our bedroom can get quite bright (even with blackout curtains).
Anecdotally though, the most important factors for me are sun exposure (particularly morning and evening), weight lifting (or exercise in general), and cutting out caffeine.