Normally such pain is seen due to some unusual movements done like carrying too much of weight or prolonged sitting position. Your back seems to have gone into muscle spasm.
Next Steps
Take a muscle relaxant prescribed by your family physician. Apply ice pack on you lower back. Start slowly with back extension and core muscles activation as the pain subsides.
Health Tips
Avoid forward bending postures like prolonged sitting or lying down with legs bent.
Avoid hot packs.