From personal experience, if I didn't get enough sleep or haven't eaten well, the productivity of my work just go down the drain. I get cranky and I can't focus, but I have seen a lot of engineers who can work for days sleeping just few hours a day on just crackers. They don't mind not eating or sleeping well as long as they meet the deadline.
He advised me to ditch coffee, which resolved what was otherwise going to be a diagnosis of chronic fatigue syndrome (which is a diagnosis of exclusion of a disease that not everybody agrees even exists). If you're feeling tired, try giving up any drugs that affect how awake you are.
(And go to a doctor. Plenty of engineers don't eat right as well as not sleeping right, anaemia feels absolutely terrible but is so easy to diagnose and treat)