I agree with Carys, this sounds like sciatica. This means sitting and lying down will make it worse. What is needed is stretching and light exercise. The NHS have an exercises page and there is tons out there on Google (some that helps that the NHS doesn't mention in terms of exercises). But sciatica can take time to resolve. I found TENS helped which originally was something I found for my dad who had a history if sciatica to the severity of when it appearing he was crawling around in the floor for days (and it really helped him).