For those of you pulling overnight shifts and mainly 24+ hr shifts- is there a way to do this long term without caffeine?

I’m hoping to go into a surgical specialty and caffeine destroys my stomach and makes me feel anxious/strung out. I did my rotations without caffeine except for overnight and 24 hr shifts bc I just needed energy

Are there any alternatives?