As a veteran of many such episodes i will presume it’s muscular pain and suggest you take anti inflammatories, use a heat pad of some description and keep moving. Lying/sitting for prolonged periods will just cause it to seize up and become even more painful, as you have noticed the pain was worse first thing after being asleep. Even if all you can do is shuffle about a bit, it’s better than sitting/lying still all day. If you think you may have slipped a disc then forget everything I said and get yourself to a medical professional.