I just finish a 21 day water fast yesterday - it’s the first time I’ve done it. My sleep was only slightly affected. Not because I was hungry, after 3 days your appetite more or less subsides. The only notable thing that happened as it relates to sleep is that I would only sleep for 5.5 hours and my body would wake up, not groggy or tired. Typically when I eat “normally” I get about 7 hours.
After a couple weeks I stopped thinking about eating until it was time to eat in the morning. Your body gets used to it. You just have to power through the adjustment period.