If you can't sleep well all night because of fitness, is it because you are tired from too much exercise? Just like a child who is too tired to play during the day and can't sleep well by rolling and grinding his teeth at night.
You can adjust the amount and intensity of exercise properly, and stop practicing 1 hour before going to bed to give your body time to rest.
Pay attention to relaxation after the end, especially after strength exercises.