You've probably had to wake up to pee at night but not poop, and that's thanks to surprisingly intelligent parts of your body ...