Patrick, I have a similar condition.
Like Garrett said, it could be food allergies. For me that was the #1 cause of the problem. I had those painful spasms/flare ups for 20+ years of my life. Long story short, Paleo, Fish Oil and cutting nuts, legumes and dairy worked wonders for me.