Your medication isn't working. Switching might help.
It sounds like some sort of spasm, which might respond to electolyte restoration (I'm thinking increased magnesium), but you'd need to be more specific about the occasions it happens. I have seen patients that generated this sort of response with anxiety, but others had a range of medical issues. One helpful thing is to keep a journal of episodes and what was different about that day (food, work, bowel movements, etc.) Then take the journal to a specialist and see what can be done.
I hope this is helpful. It is for informational purposes only, and does not in any way alleviate your need to have a local doctor that can advise you.