Sounds possibly like a ruptured or bulging disk. I had a similar thing a year ago, triggered by bending down to pick something up. pain similar. locatalised to lower back and extremely restrictive. Lying is good (still painfull), but changing positions gets the swear words flowing.
I rested up for a few days. Took anti inflamitories, and saw a physio who identified the issue and gave me exercises to repair/prevent further damage.
Seeing a doctor is probably the best thing. That way prescribed pain and inflamation medication can be used, and they can recommend a further treatment such as physio etc.
Just as an afterthought, the treatment for me was to lie on stomach, and push torso off ground using arms, keeping pelvis on the ground. about 10 reps per session, a few times a day. Alternatively this can be done standing up. placing hands on lower back (top of bum cheeks) and slowly bending backwards keeping hips forward. Only go to limit of pain, and push further as pain subsides. If its working, it should get easier to go further after a day or two.
I would get professional advice first, but if its really bad i guess trying things can't make it too much worse!