Keeping a food diary can help you identify foods that don't agree with you. Every day, list the foods you eat and any symptoms that occur. Once you pinpoint a food that seems to trigger your symptoms, cut it out of your diet for a couple weeks and see what happens. Then add it back in. If the symptoms went away with its subtraction but return with its addition, you've found your culprit.