Set a timer for hydration. You will forget towards the end of it. All the things your body does automatically will become less effective. Like obviously your fuse will be shorter. But you'll feel more hungry with less warning, for instance. Satisfying that in a way that might normally make you a bit tired could be enough to make you crash out. But you need to keep eating or you'll feel like starved hell. Keep it light/snackish. Also try to avoid extra stimulation. If you need stimulation to stay awake keep it minimal as you can.
Additionally, recognize the point of damage. If you're finding yourself taking completely unintentional 'microsleeps' (passing out for 15-120 seconds) that's your brain screaming for mercy and you should take rest if it's even remotely possible, and results get truly unpredictable past that point in regards to emotional/mental stability.
Hope that helps, here to answer if you want clarification on anything there