Welcome to health care magic.
1.The symptoms and history suggest most possible cause is
IBS -
irritable bowel syndrome - this happens when the bowel / GIT - gastrointestinal tract sensitivity.
2.In this case preventive measures are better than treatment.
3.Treatment in this case is maintain dietary changes - Take more of salads,vegetables,fruits, and fibrous diet for better bowel moment.
4.Avoid junk, spicy, fat containing food,alcohol and other addictions that will help.
5.And a little workup or brisk walk. These remedies will help you in long run. Good luck.
Hope i have answered your query,
any thing to ask do not hesitate to ask.
http://doctor.healthcaremagic.com/doctors/dr-ganesh/62888