When do you know it's going to hurt

I have this weird thing with my leg where my muscles twitch right before it gets extremely painful. This never happened before my last surgery in December, but then again the surgery caused this other AVM to grow. Has anyone else had a thing like this? Does anyone else have other signs like mine when they’re about to be in pain?