Why have I lately been experiencing sudden contractions of my legs like spasms when I meditate?
This is fairly common. I have experienced a lot of that - not just in my legs, but in my arms, too. You can think of it as a small part of what’s been historically called “Kundalini awakening”, and which I prefer to describe as your body’s nervous system slowly rewiring itself into its natural state.
It can be unpleasant, but it’s not dangerous. It’s involuntary, so the best you can do is just accept it. It can last for months, but eventually all these ticks and spasms subside. But since you’re asking that question, there’s probably more waiting for you. Don’t worry about them. You can even learn to enjoy them, knowing that it’s a sign of some changes going on within you. Don’t try to suppress them and don’t be upset about them.