I get questions every now and then about intermittent fasting affecting people's sleep, and most people after just a few days find that their sleep is actually better. If you've been doing intermittent fasting for more than a week and are still having trouble with sleep, you should try shifting your eating window to earlier in the day (why is partly explained near the end of this video). However, (this may be unfortunate news...) it seems that coffee starts this eating window.
As Dr. Rhonda Patrick says on the Joe Rogan show (https://youtu.be/uxM_CLsvieE?t=2h34m45s - Should start at time stamp 2:34:45) : Caffeine is a xenobiotic, it has to be metabolized. The first thing non-water thing you put into your body is going to start all these different clocks that affect metabolism, so after the clock starts, you want to consume everything in at least a 12 hour time frame (& earlier in the day) to reap the benefits of more optimized metabolism.
Here is another check out this excellent interview with Dr. Satchin Panda and Dr. Rhonda Patrick: https://youtu.be/-R-eqJDQ2nU discussing the benefits of time restricted feeding.