The op is absolutely right - we are constrained by our physical bodies and they require the proper fuel and rest in order to operate at peak efficiency. Just because you're using your brain instead of certain muscles, doesn't mean you can consume garbage. This isn't a bad on your comment as much as is it a comment on society as a whole. The whole Zuck bs legend has really damaged programming on multiple levels and it completely reject that ethos.
I've worked with devs that ate garbage all day, couldn't sleep, always came in late (they were non-drinkers too) and their job performance sucked. Their attention sucked. Their attitude sucked. Their code sucked. Needless to say they were all fired. But alas, this is a tale not about the voices of reason, but of bs movies and news headlines and even tho the op is critical (realistic?) of this, that opinion I'm sure is in the minority.