i have been on night shift for a 2 years and on and off for like 10 years.
everytime i take something for sleep, it never fails i have to wake up early and then i am a complete zombie.
i get any where between 2-6 hours of sleep a day, yes there are some days i get more but there are days where i do not get any. i still try and make it to the gym 3-6 times a week.
usually if i get into a spell where i can not sleep i just set a time of day for sleep and try to lay down during those hours, when that time is up i just get up and get going and try to do everything that needs to be done. the thought is eventually you will break yourself and you will go to sleep during this scheduled time.