Sort of in the same boat.
Worked night shifts about 7 years ago. Would work 5 night shifts, have 5 days off, then 5 day shifts, then 5 days off, etc. Had issues sleeping (duh), so doctor prescribed Zolpidem. Half a pill became a whole as my body built up resistance to it, but the foggy feeling the next day made me decide to come off it. Tried other OTC meds, but nothing had the desired effect. Tried natural supplements, but nothing could make me fall asleep, so was back on the S5 stuff.
Stopped working nights, and when my body had cycled back into "normal" hours, I started weening myself of the pills. Still couldn't fall asleep (would literally toss and turn until the sun came up) - so went back to the OTC stuff. But it was at that stage that I realised what the REAL problem was: I had developed adrenal burn out. TL;DR diagnosis: "tired but wired".
Pretty ****ed up, but fast forward 7 years, and I can count the number of nights I've slept without "assistance" on one hand. And I'm at a loss on how to reset my circadian rhythm, and just get a good night's sleep on my own.
Remember, guys, it usually says it on the box: for short term us ONLY.