Have you ever been so frightened or surprised by something that you peed yourself, even just a little? It's ok, you're in the company of friends — nobody is going to make fun of you. After all, it's not like it was your fault; strictly speaking, if you did leak a little bit the last time you were scared, it was probably the result of your brain acting on its own. See what happens when you let your grey matter think for you?

Control of your bladder basically boils down to a system of checks and balances maintained by three systems housed within your brain. The first is an area of your brainstem called that pontine micturition center (we'll call it your PMC for short); the second is your prefrontal cortex; and the third is your limbic system.

If the only part of your brain in conversation with your bladder were your PMC, you'd urinate more or less every time your bladder became full. When your bladder distends past a certain threshold, neurons in your PMC start firing off like crazy. The spike in activity in your PMC causes your urethra to relax and your bladder to contract. Fortunately, most of us can override this activity consciously by sending what are known as inhibitory signals from the prefrontal cortex to the PMC in the brain stem.

And that's where the limbic system comes in and ruins everything. The limbic system has long been regarded as the combination of brain regions that is responsible for your fight or flight response. This response can be especially useful when your body needs the biochemical boost required for, say, outrunning an axe murderer or grappling with a grizzly bear.

But when it comes to continence, too many signals from your limbic system are your worst enemy, because when these signals are particularly strong, your PMC (which, you'll recall, is in charge of telling your bladder to let loose) starts to have trouble following inhibitory orders from your prefrontal cortex. When signals from your limbic system become too intense, your PMC stops listening all together, and you urinate—whether you want to or not.

But for as damaging as pissing yourself might potentially be to your social status, there's evidence that suggests incontinence may have once been an evolutionary advantage. Slate.com's Brian Palmer writes:

What's clear is that urinating in the face of danger pervades the animal kingdom. Gazelles wet themselves with a lion in hot pursuit. Pigeons often become incontinent when chased by wild-eyed toddlers. Laboratory rats have a nasty habit of peeing all over researchers' hands. Some speculate that the instinct is related to the practice of marking territory with urine to prevent conflict. Alternatively, it may be that urinating could put a pursuing predator off the trail. In the absence of a good explanation, you're free to speculate.

Read more about fear-induced urination (and the related condition known as paruresis, or "shy bladder") over at Slate.com