A "brain fart" is a term for an inexplicably stupid error in a straightforward task made by someone with abundant skill and experience. Everyone is prone to them. Neuroscientists call these episodes "maladaptive brain activity changes."
The latest research seems to indicate that brain farts are a unique type of cognitive mistake. They have a predictable neural pattern that emerges up to 30 seconds before they happen.
Basically, your brain will take any opportunity to shut down some of its processing systems. Here's the process step by step:
You're daydreaming, and your medial temporal lobe subsystem, precuneus, medial prefrontal subsystem, and posterior cingulate cortex, which together make up the default mode network (DMN) are all active.
You confront a demanding task, such as driving home. Your anterior cingulate and right prefrontal regions, brain areas involved in attention, begin to activate, as do the cerebellum and the parietal, visual, and temporal cortices, which control the motor coordination you need to pilot through traffic. At the same time, the DMN deactivates.
Your route is extremely familiar. Your frontal lobes, bored by this habitual task, begin to power down. The retrosplenial cortex in the posterior section of the DMN begins to stir again. When the balance of activity between the DMN and the attention network reaches a certain threshold, you enter an error-prone state. You miss your exit off the highway.
Your frontal lobes fire up again at high levels in an attempt to compensate for the error. They return to a state of optimal performance, ready to work on a corrective action.
The stress of having made a blunder activates the limbic-hypothalamic-pituitary-adrenal axis, your brain's "panic button." You experience a surge of the stress hormone cortisol.