Welcome to HCm,
It seems that you have got spasm of your back muscles might be due to some unusual movement at back during sleep.
This gives problems aggravates while stand up due to movement muscles go in to spasm.
Apply some muscle relaxant
cream like Relaxyl.
Take some analgesic
with muscle relaxant medicine will give relief within a day or two after spasm will be released.
ok and bye.