I once had an incident where I tweaked a muscle in my neck so bad in my sleep I couldn't turn my head for two days聽 ;-;聽 Since then, I've sworn to do neck stretches before bed--I take it easy on myself: i have one or two stretches and I only hold them for 10-15 seconds, or however long I have the patience for, but they REALLY help.聽
My best advice would be find one or two back stretches and start doing them before bed. Any amount of time stretched is better than no time! also, if doing the stretch hurts, ease up on the movement, it means you've stretched too far. Your first few times stretching might be tough if you've never done it before, but after a couple of nights of stretching, it should help ease the tension in the back muscles! when you're stretching, MOVE SLOW, if you move really fast going into or out of the stretch you can really hurt yourself (my own experience. . . . don't move your head too fast after stretching your neck. . . . it hurts SO bad)
Hope this helps ^-^