While the sympathetic nervous system (SNS) is responsible for our fight-or-flight response, the parasympathetic nervous system (PNS) is the SNS's much chiller cousin, helping us to wind down after periods of stress (per Cleveland Clinic). And while it definitely doesn't feel chill, when the poop sweats strike, you can be sure that the responsible party is none other than the vagus nerve — a principal component of the parasympathetic nervous system (per Cleveland Clinic).
Tasked with controlling involuntary sensory and motor functions like digestion, heart rate, blood pressure, breathing, immune response, and skin and muscle sensations, the vagus nerve runs from the brain to the intestines. When we have the sudden urge to use the bathroom, that's the vagus nerve at work. As part of the digestion process, the vagus nerve triggers peristalsis — the involuntary contraction and relaxation of the muscles that line our gastrointestinal tract, which helps waste products move toward the rectum (per MedlinePlus). While peristalsis will occur no matter what, sometimes outside factors can stimulate the vagus nerve and contribute to the sense of urgency.
When the vagus nerve is overstimulated by things like stress, pain, vomiting, or straining to pass a bowel movement, it can cause a vasovagal reaction in which the heart rate slows and blood pressure drops too quickly (per GoodRx). This condition — called vasovagal syncope — is the driving force behind the poop sweats, as well as accompanying feelings of dizziness, and can even cause loss of consciousness in severe cases.