Yep, Sounds like you've just strained your lower back and it's caused a spasm, it'll be ok. It may get worse tomorrow though. I've done it a couple times in the last couple years. Really sucks.
I almost never take muscle relaxants, but for this type of injury it may be a good idea. I've had it very bad before and a relaxant makes a big difference in recovery time. Otherwise, every time you move wrong until it totally subsides, it just spasms again and back to zero you go. Not a pain-killer like codeine, but a real relaxant. Diazepam for a couple days has worked for me, followed by stretching. With no relaxant, it's taken friggin' weeks for me to recover. Depends on how bad it is.
Otherwise, in the future, stretch your lower back well before doing legs. Doing high rep (15-20) hip thrusts with moderate weight in my leg routine, has made a huge difference in how many dumb things I can get away with too, regarding low-back stability. You may want to try them when you feel better.
Hope you feel better soon.