I've just found a wild garter snake outside doing just that. It doesn't look wounded, but it is seemingly convulging in pain, twisting in circles around itself, lifting up its head and plopping it to the ground.

So, I googled it, and here's the first (and only thing) that seems to match. I'm hoping there's something I can do help it. Any information would help, although it's sad to think that it's simply reaching the end of its life.