You could possibly have a pinched nerve in your lower back that is causing all this pain. If you have any swelling or redness to your legs on top of the pain, you need to see a neurologist asap. It can get much worse.
What is the cause of leg pain that occurs mostly at night and during the day pain in the shins of both legs is prevalent especially when not mobile