Losing weight but losing sleep too!

I’m losing weight and it’s great. However…my sleep is really messed up since I started losing weight and intermittent fasting. I struggle to sleep for hours and instead of sleeping regularly at 10pm like I was before, I can’t seem to sleep until 1 or 2am. For two nights this week I finally ended up eating some nuts, and then was able to fall asleep. I’m not happy about breaking my fast though. I was wondering if not sleeping is a common side effect of IM and whether it will pass. Otherwise, could I take a spoon of MCT oil or butter in the night to not break my fast but restore my sleep?