Bananas are safe to eat when having indigestion. Bananas have soluble fiber and pectin which have been shown to improve diarrhea symptoms. Banana flakes can be effective in diarrhea treatment (Emery et al., 1997). Fresh bananas before ripe, or green bananas, have the most pectin.
Sources