Hello and hope you are doing well.
Considering the different locations of pain described, the pain could also be due to compression of a nerve. The resulting symptoms are often referred as sciatica. This occurs due to spinal disc herniation (slipped disc), spinal stenosis (narrowing of spinal canal) or due to the piriformis syndrome. Please discuss this with your doctor. He will do a series of examinations to confirm the cause for the pain. Usually it is treated conservatively (without surgery). If it does not respond he may then ask for a CT or an MRI scan.
Hope this helped and do keep us posted.
What I do when either my hips down my legs or ribs or shoulders down my arms are hurting and disturbing sleep is take a muscle relaxer or two. A heating pad on my hip feels so good. A hot bath before bed is your best bet.
Do not take the muscle relaxer before a deep hot bath.
Soma, Flexeril, and Baclofen are three that work well.