People do this sort of thing all the time in automobiles & that's a LOT more dangerous, you would think it was rare but good on the pilot for taking it on the chin & hopefully he is cleared medically to fly again
Most of us have or felt fatigue whilst flying especially at night so it's a normal human condition for us to feel tired or have a felling of low ebb hence there's more & more awareness of fatigue in any Co's pilot management, shame some Ops dept's or some mangers don't see it that way!
Poor diet, low or no water intake during flight & yr weight general fittness or lack thereof causes all sorts of problems as we are a a fat lazy society & take that into the air at times.
Wmk2