Given that you have between 7 am to 5 pm them to sleep and do everything else you need to do there should be time after you wake up to work out before you go to work in the first place. Honestly using coffee, energy drinks, etc are not a healthy sustainable way to live. The big issue is not that you work at nights its that you have to efficiently use your time and keep a continuous schedule even on your off days. I'm sure its hard having a social life when you work nights but you should try to keep a continuous schedule of sleep even on your off days. It'll make a difference that's healthy, sustainable, and energy creating. Once you keep a schedule for a bit you'll notice your at the gym more and sleeping regularly. I've done nights before, you just ave to be vigilant, and have the will power, to keep everything to a specific schedule-- or it will all go to crap.