Yeah, they're just absolutely crappy. Mine are nerve/sciatica/crummy connective tissue related. I take ibuprofin every night which keeps any inflammation down that might contribute to them so maybe if you think you've over exerted yourself that might be something to try. Seriously it helps me out a lot. Then if things are really bad there's always OTC muscle relaxers (or you could get a script) but that sh*t leads to loopiness and potential addiction so I try to avoid them.
The real thing that helps me though is making sure I ice and heat my back and do my physio. I do about 5 hours or more of that every day/night. It's annoying as frack and it's like having a part time job that doesn't pay anything but since I've started doing that stuff religiously I'm not totally twisted up all the time and can actually walk around my apartment a little during the day on my good days.
If you can afford it another thing that might help you is some massage therapy (I know you are just getting back to work but it doesn't take a lot). Sounds like there are some muscles getting all binded up and spazzing out on you while sleep. That's how it hits me and getting rid of the knots was very helpful. I desperately wish I could get myself back into regular RMT sessions. For some ridiculous reason it's not covered.
Anyway... I've got tons of tricks up my sleeve to deal with that type of stuff so if you need any more suggestions let me know. Pain is a b*tch and THAT type of pain is a long time foe of mine that I have a lot of experience dealing with.
Oh... I forgot bromelain. That's the stuff in pineapples but you can get it in capsule form (you probably know about that but it's worth mentioning). It's a natural anti inflammatory so double teaming that with bananas is good for mild stuff. If it's a tendon cartilage issue (which is what happens with me) shark's cartilage powder can help strengthen connective tissue/joints (also available at health food shops).
Cheers, bro.