There is a direct connection between Resting Heartrate Variability (HRV) and better sleep. The lower you can get your RHV while you are asleep, the better quality sleep you will experience.
Eating/Drinking (other than water) in the few hours before you go to bed will cause your RHV to stay elevated after you go to bed. So by practicing IF, you are helping your sleep by limiting the activity of your metabolism before bed, thus causing better quality sleep.