That should be doable for you. If it's only lack of sleep for one or two days you should be fine. I was averaging 5/6 hours per night for my 2 weeks of exams ahah.
If you feel tired that day obviously caffiene will work. Food, water to keep you hydrated will wake you up a bit. If you feel particularly drowsy, get up and have a bit of a walk about if possible, that will help keep you awake. Sit in sunlight too. That always helps me stay alert.
I hope your exam goes well 😊