I am the master of lower back pain. I live with it everyday. Those spasms can really knock you out for a while. Nobody really understands why the back behaves the way it does. There are many theories. I've tried almost everything, most of it does nothing. The number 1 best thing you can do to prevent such bad episodes is to stretch daily. Stretch your glutes, hamstrings, and everything else that is connected to your back, but do it gently and often. The other thing you can do is find a position of rest that your body likes. For me, it is in a reclined lazy boy with extra pillows underneath my knees. This really relaxes my back. The final thing you can do is realize that there is probably a mind body connection with this back pain. The more stress and negative emotions you are under, the worse it is for your back. There is a theory by John Sarno MD that your mind puts the pain in your back as a way of dealing with the negative emotions. Look into that, it might help.