You're in the shower. The water sounds like a gentle, rainy static, and feels like a Plinko massage. You've just started to lather up and suddenly, you're hit with a flash of brilliance. Maybe it's the answer to a vexing problem at work, the location of your lost USB drive, or perhaps it's just a random, inconsequential (yet totally satisfying) insight.

But, by the time you towel off, the idea already has spiraled away down the drain. We all get these kinds of thoughts, and they don't just happen in the shower. Long drives, short walks, even something like pulling weeds, all seem to have the right mix of monotony and engagement to trigger a revelation. They also happen to be activities where it's difficult to take notes. It turns out that aimless engagement in an activity is a great catalyst for free association, but introducing a pen and paper can sterilize the effort.

There haven't been a lot of experiments on why we get random insights, but psychology does have a theory that describes a mental state that seems to foment these kinds of thoughts. It's called the default mode network.

"You become less aware of your environment and more aware of your internal thoughts,” said John Kounios, a psychologist who studies creativity and distraction at Drexel University in Philadelphia.

The common thread in these activities is they are physically or mentally active, but only mildly so. They also need to be familiar or comfortable enough that you stay engaged but not bored, and last long enough to have an uninterrupted stream of thought.

Kounios explains that our brains typically catalog things by their context: Windows are parts of buildings, and the stars belong in the night sky. Ideas will always mingle to some degree, but when we’re focused on a specific task our thinking tends to be linear.

Kounios likes to use the example of a stack of bricks in your backyard. You walk by them every day with hardly a second thought, and if asked you'd describe them as a building material (maybe for that pizza oven you keep meaning to put together). But one day in the shower, you start thinking about your neighbor's walnut tree. Those nuts sure look tasty, and they’ve been falling in your yard. You suddenly realize that you can smash those nuts open using the bricks in your backyard!

As far as Eureka moments go, using a brick as a nutcracker is pretty lame, but as an illustration for how the default mode network frees the things in your brain from external associations, it works quite nicely. As ideas become untethered, they are free to bump up against other ideas they've never had the chance to encounter, increasing the likelihood of a useful connection.

Rather than a catalog of our collective wisdom, the Poop Journal became a repository of inside jokes, gross artwork, and recaps of our days.Random insights aren’t well studied, because as Kounios points out, “You can’t just sit somebody down and wait for them to have a novel idea.” However, there has been a lot of research on eureka moments, or flash epiphanies that solve a particular problem. The most famous is the apocryphal story of how Archimedes figured out that his king's crown was a fake.

As the tale goes, King Hieron II had given his goldsmith a lump of gold to make a crown. However, he was suspicious that the artisan had taken some of the gold for himself and replaced it with less-precious silver. But, short of melting the crown, the king couldn’t be sure the goldsmith had ripped him off. He came to Archimedes with the problem. The famous scientist was stymied, until one day he had a realization while bathing: When he sat in the tub, the water rose corresponding to the volume of his body. If the goldsmith had cut the crown with silver, he would have had to add extra silver to make up for the weight of the denser gold. So, if the crown was cut with silver, Archimedes reasoned that it would displace more water than a chunk of pure gold that weighed the same. They did the test, and the goldsmith turned out to be a cheat.

Archimedes emerges enlightened from his bath. Wikimedia/public domain

Like Archimedes, when you are working on a problem your brain tends to fixate on one or a few different strategies. Kounios says these are like ruts that your mental wheels get stuck in. “If you take a break however, those thought patterns no longer dominate your thinking,” he said. The problem gets removed from the mental ruts and mingles with other ideas you're carrying in your head. Eventually, it finds one—or several—that click together and rise up like Voltron into a solution. This is called fixation forgetting.

Shower thoughts aren't always attached to a specific problem, but fixation forgetting still helps psychologists like Kounios understand those random cocktails of revelation.

It’s not clear how your brain decides which are the right connections, but it’s obvious that the farther your brain can roam, the better. Research has shown that your brain builds bigger creative webs when you’re in a positive mood. This makes sense, because when you’re anxious you’re less likely to take a chance on creativity. Even when resting or taking a break, anxious brains tend to obsess on linear solutions. This may be part of the reason that when you bring a way to record your thoughts into the equation—such as a notebook, voice recorder or word processor—the thoughts worth recording become scarce.

When I was in college, my roommates and I decided we wanted to harness some of the fruitful free association happening in the bathroom. We bought a beautiful, purple notebook, and titled it the Poop Journal. Every time I went to do my business, I grabbed a pen and laid the “PoJo” over my knee. But, the insights rarely came. It was similar for my roommates. Rather than a catalog of our collective wisdom, the Poop Journal became a repository of inside jokes, gross artwork, and recaps of our days. Why did the tool for posterity end up spoiling the creative fruits of our labor? Where do those thoughts come from to begin with?

“Not having an explicit task is the main ingredient for random insights,” Kounios said. “Once you have a pen and paper there, it’s not really your mind wandering.”

It doesn’t even take a pen and paper to spoil the moment. While I was researching this story, I took an expectation for insight with me into the shower every morning. The best I could conjure by force was something that sounds more like the product of a bong than a warm shower: “People anthropomorphize dogs, and dogs canipomorphize people.”

That doesn’t mean your eureka moments are doomed to be flushed away. Kounios says if you acclimatize yourself to your recording method, and keep it out of sight (yet within reach), your mind won’t be waylaid by external pressure on its way to free association. This could be a water-proof notepad for your shower, a voice-activated recording app for the car, or even an unobtrusive pocket notebook for when you’re sitting on the can.