Stomach spasms relate specifically to the digestive process. They can happen if a person has an infection in their digestive tract, acid reflux, eats spicy food, or has dinner late at night.
A diaphragm spasm occurs in the muscle that lies between the abdomen and the lungs. It can be due to digestive factors, but it may also indicate a lung, heart, muscle, or nerve problem.
A diaphragm flutter is a rare and specific condition. It is different from a spasm.