It could be a food intolerance. Intolerance is different than a food allergy, but the body can react in odd ways with intolerance. Allergy can be life-threatening and can be diagnosed with testing for the IgE antibodies through skin prick or blood tests. Intolerances can't really be definitively diagnosed and they're more subtle. Lactose intolerance is a good example of this. Flatulence, bloating, vomiting, skin rashes, headaches, sleep disorders, etc. *are* the diagnostic tools used to figure these intolerances out.
Anyway, it may not be something you can test for. Research food intolerance and Feingold Diet and see if anything pops up that you can relate to. You many need to pursue an elimination diet to see what the culprit is.
My dd has food intolerance and it affects her digestive system and skin mostly. Not stinky poo, but loose, discolored stools. (Sorry if TMI.

) She has severe eczema if she has processed food. In dd's case, it's food chemicals... artificial coloring, artificial flavors, MSG (causes headaches), preservatives, etc.