Strenuous workouts can deplete the glycogen stores in the muscles.
Since the muscles need glycogen as energy, cortisol is produced.
The cortisol speeds up the process of refueling the muscles with glycogen (by increasing the blood sugar).
As Ace Cabbie mentions it can take many hours for the cortisol levels to come down.
In a study of 20 young men running a fast 5 km before breakfast one day compared to a rest day, they found that it took approximately 6 hours for cortisol to decrease to normal levels:

As mentioned the increase in cortisol results in increased blood sugar:

For both figures: continous line = running day, dashed line = rest day.
If your issues with sleep is caused by too high cortisol levels the best thing you can do is probably to workout as early as possible in the day (but not fasted).
Another solution could be to try to avoid depleting the glycogen.
You could workout less intense or for shorter duration. Instead you could work out on more days.
Eating carbs causes an increase in insulin. Since insulin and cortisol are antagonists this will reduce cortisol.
Therefore you should eat a meal rich in whole carbs immediately after working out. Also a low-carb diet is problematic with respect to cortisol.
This study on 7 men on either a 10 day high protein-low carb or a 10 day high carb-low protein diet (sum of calories being equal) found that cortisol levels was approximately 50% higher on the low carb diet.
The reason for this is that a low-carb diet leads to smaller and easier to deplete glycogen stores in the muscles. Therefore you should also consume carbs before your workout. This article advice to center carbs around workouts if you are on a low-carb diet.
This article discusses further some nutritional strategies to avoid this problem.
The body has 3 energy systems:
- fat: used when eg. walking
- glycogen: used when eg. running
- atp: used eg. when lifting weights
You could try to workout more in the two other energy systems, since these do not increase cortisol.
That is do less HIIT, do some walking and or lift some weights.
Weight training is also a effective way to reduce bodyfat. The body spends a lot of energy rebuilding the muscles and increased muscle mass leads to increased energy expenditure.