I have read it's evolutionarily advantages to be more alert when fasting to assist with hunting and aquiring your next meal. "that’s what we’re finding in lab animals — the brain and body actually perform better during fasting. In the case of the brain, cognitive function, learning, memory, and alertness are all increased by fasting. " - https://www.brainfacts.org/Thinking-Sensing-and-Behaving/Diet-and-Lifestyle/2018/How-Does-Fasting-Affect-the-Brain-071318