I sleep best if I have five hours between food and sleep. This means I do not eat dinner with my husband, but that is better than pooping all night. Try eating more food earlier in the day and less later. Also can try taking immodium or Lomotil at night.
If you go that often at night, how often do you go all day?