I have an irregular sleep pattern anyway, so when I wake up I just get up for a while to avoid just lying there thinking about stuff. Doing a few things for a while lets me relax until I get to a point where I can go back to sleep. This may happen for me a couple times or even more in a night.
You may return to a better sleep for yourself over time naturally, don't sweat it too much. Your body will get into its rhythm on its own, but the suggestions above are all good, especially for falling asleep when you are tired. You'll also read that clean sheets are a great thing for making that space welcome for rest, and it's true.