There are several potential causes for these abdominal and stomach cramps. Since they have been happening off and on for quite a while, I think it is worth going to see your primary care doctor
who can help you figure out what might be going on.
First of all, it would be important to rule out stomach irritation, such as heartburn symptoms or gastritis (which is an inflammation of the stomach lining). Make sure to tell your doctor if you have any burning or indigestion symptoms and if these are associated with any particular food (such as spicy foods). While waiting to see your doctor, you may want to avoid alcohol, caffeine, smoking, and over the counter anti inflammatory medications which can all make stomach inflammation much worse.
A food allergy or food intolerance
is certainly a possibility. One of the most common food intolerances is lactose intolerance, which leads to cramping after eating dairy products. Also, make sure to mention to your doctor if you have noticed any rashes or itching or swelling of the face or lips when eating certain foods.
Finally, irritable bowel syndrome
, which causes cramping and pain usually in association with times of increased stress is a possibility.
Please talk with your doctor, who will be able to help you figure things out.