Some people here mentioned caffeine. Caffeine is not recommended even three hours before your night shift is up as it works together with the circadian clock to keep you up and you don't get a proper...
If you have to work nights it is recommended to stick to a schedule and try not to do rotating shifts if possible. Also stick to the same routine on weekends. Check out some good info at Jobs Working...