Intestinal viruses, diet changes or reactions to some medications also can cause the condition. A helping of macaroni and cheese, a milkshake or cottage cheese can cause gas, bloating, cramps and diarrhea as the food winds through the digestive system.