My work roster screws my sleeping pattern up every couple of days
I'm in a similar position. In my experience it takes a bit of trial and error to find a pattern that works, and even then it might change from week to week. Sometimes I'll have a snooze before going back to work at 10pm, other times I'll be awake the whole day.
I did get sleeping pills years ago (and that was because I gave up smoking and it completely f**ked up my sleep) - they worked but they worked too well if that makes sense, I was always waking up tired. I can't remember the name of the pills.
The only real advice I can offer is to not force it. If you can't get to sleep then get up for a while, read a book, browse LU, or do something else - but get out of bed to do it. If/When you get sleepy go and lie down again. It sounds basic but I've found it works best.
Another tip is to try and stay awake during daytime hours. If I finish work at 3am I'll get up again at 8am regardless and try to have a "normal" day - sure I might doze off on the couch for a bit but it's better than sleeping right through to 4pm and then being awake all night.