If we’re just talking calories, the necessary condition for sleep to be advantageous should be that the calories obtainable at night aren’t sufficient to cover the caloric cost of being active. With your 20% example and 16 hours of foraging, daytime foraging must have provided at least (16+8*80%)/16 = 140% of the calories it cost, meaning that even being able to obtain one seventh the calories foraging at night would pay for the extra cost relative to sleep. Intuitively, it seems like most animals would be able to do this and would get more calories from not sleeping.
If we’re just talking calories, the necessary condition for sleep to be advantageous should be that the calories obtainable at night aren’t sufficient to cover the caloric cost of being active. With your 20% example and 16 hours of foraging, daytime foraging must have provided at least (16+8*80%)/16 = 140% of the calories it cost, meaning that even being able to obtain one seventh the calories foraging at night would pay for the extra cost relative to sleep. Intuitively, it seems like most animals would be able to do this and would get more calories from not sleeping.