"According to this study[1], morning exercise might be more helpful; there is no sign that evening exercise disrupts sleep, but it might not help as much either."
From https://lorienpsych.com/2021/01/02/insomnia/ which also has other advice
[1] https://sci-hub.st/https://www.sciencedirect.com/science/art...