Maybe he is bloated from the beans. They have that effect on my husband so why not cats.

Seriously, does his belly seem extended and tight? Maybe you could call a vet and just ask them if the beans might be the culprit and what could be done.