I did nigh****s for years and I would advise to take any sleeping product only if you plan to sleep at least 6 hours.
I tell you what I used to do. My shift was 8pm to 8am. I would wake up at 4pm, have breakfast, go to gym from 5pm to 6.30pm. Take bus and be at work at 7.45pm. Once the shift is over. I would arrive home at 9am, take 3-5mg melatonin and be in bed by 9.30-10am.
Hope this helps and give you a good example of what worked for me.