Sometimes I feel a bit of a warning twinge but usually not. Tends to come out of nowhere like yours. Just bending slightly triggers it, last time I was putting my socks on.
When it happens I have found it best to sit in a chair, upright (with the tilt-back on the chair locked off), with a pillow behind me and with a cold pack on for about half an hour followed by a hot water bottle on it for about an hour - this seems to relax the muscles. I take naproxen, which I have on prescription, alternated with co-codamol of it's really bad (as advised by the doctor, but got to watch it with those, they sometimes make me feel dizziy and sick), and then it's 3-5 days to recover till the next one.
Think you said twice a year? Last time mine went was in February, time before that the previous March and twice in the December before that. I can go a couple of years or more without one, but it seems to be getting a bit more often lately.