Hello,
I read your message and understood your problem.
Your problem is quite common among people working in night shifts.
First, try not to take many night shifts in a row because by this way you will become more sleep-deprived and it will damage your health.
Work in bright light to promote alertness and limit caffeine intake. Do not drink coffee in last hours of shift ending.
Use heavy curtains or find some place dark in your home to sleep there. It will help you sleep better.
Protect your eyes from light when you come back home. Wear a hat and dark sunglasses while walking or riding/driving back home. Try to eliminate any factor that can awake you like phone calls, noises etc.
If these changes don't help some medications can be prescribed.
Some drugs keep you awake (
Nuvigil, Provigil) when you want to be awake, some make you sleep (
Ambien,
Lunesta,
Sonata) when you want to sleep.
Chamomile tea may help you calm and sleep.
Do not tend to go first on drugs. You can perfectly handle the night shifts and your sleeping by doing some little-scheduled changes that i explained and with a good diet. Never skip meals.
A good sleeping hygiene is first needed to improve sleeping.
If you do not receive results by doing this contact a doctor about what drugs you may take. Don't take drugs by yourself.
I hope this is helpful for you.