Hi
Welcome to the forum!
Yes, as Caregiver pointed out, there is a pinched nerve somewhere.
My only concern is your symptoms coming while lying down and improving with movement.
Pain worse when sitting or lying down and feels better with movement is usually caused by ankylosing spondylitis. This is a genetic condition. Medicines, physiotherapy, exercises and drugs to suppress immunity are the mainstay of treatment.
A back pain or a referred pain due to a nerve pinched that is worse on lying down or felt mainly on lying down can also be due to a tumor within the spinal cord. A neurological examination can pinpoint the site. A CT scan or a MRI will be surely required.
It can also be osteoarthritis.
Hope this helps. It is difficult to comment beyond this at this stage. Please let me know if there is any thing else and do keep me posted. Take care!
Sounds like a pinched nerve in the lumbar area. Surprisingly there are exercises that can help, but you have to get them from a professional. An MRI of the lower spine would seem appropriate (L1-L5). In the meantime, try sleeping on your side with a pillow between your legs.