Why is it that some people rack their brains for new ideas, only to come up empty—while others seem to shake them almost effortlessly out of their sleeves?

Whether creativity is an innate gift or a cognitive process that anyone can jump-start is a question so intriguing that researchers keep studying it from different angles and discovering new and surprising techniques.

Several recent studies suggest that the best route to an "aha moment" involves stepping away from the grindstone—whether it's taking a daydream break, belting back a drink or two or simply gazing at something green.

Of course, personality can make a difference. People who rate high in openness to new experiences in personality tests also may be more distractible and curious, according to a 2010 study in Creativity Research Journal. Among 158 college students, those who were less inhibited and more receptive to lots of stimuli also were able to generate more ideas than others, says the study by British researchers.

But personality isn't the only path to inspiration, researchers say. Walking away from a problem to do simple, routine tasks, and letting the mind wander in the process, can spark creative new connections or approaches to solving dilemmas, says a 2012 study in Psychological Science. That helps explain why "a lot of great ideas occur at transition times," when people are waking up or falling asleep, bathing, showering or jogging, says Jennifer Wiley, a psychology professor at University of Illinois at Chicago and lead author of a 2012 research summary in Current Directions in Psychological Science.

For years, Amy Baxter, a physician and pain researcher, looked for ways to use cold to relieve children's pain from vaccination shots. But her light bulb moment didn't come until she was driving home from work, tired after an all-night shift in the emergency room.

The steering wheel on her car was vibrating because the tires were poorly aligned, and she noticed as she pulled into her driveway that the vibration had made her hands numb. With help from her husband Louis, she made the connection: Combining vibration and cold might be enough to ease the pain of a shot. "After an overnight shift, your mind is expansive," Dr. Baxter says. "Connections are made that wouldn't otherwise happen."

She applied a vibrating massager and a bag of frozen peas to the arm of her 7-year-old son Max, then rolled over his skin a small metal wheel used by neurologists to test sensitivity. Max felt nothing. That discovery sparked the development of "Buzzy," a toylike vibrating bee fitted with a tiny ice pack. With help from a 2008 federal grant, she produced the device and began marketing it online. Buzzy is now being used in 500 hospitals to ease patients' pain from injections and infusions, says Dr. Baxter, chief executive of MMJ Labs, Atlanta.

Dr. Baxter's groggy, wee-hour epiphany wasn't a fluke. Students in a 2011 study solved more problems requiring fresh new insights when they tackled them at off-peak times of day—in the evening for morning people, and in the morning for night owls, says the study, published in Thinking & Reasoning.

Such advice runs counter to the conventional wisdom that solving problems requires focusing a person's attention and blocking out distractions. "When you are trying hard to focus your attention, you are going to miss new ideas," Dr. Wiley says.

Viewing the color green may help make those ideas more apparent, according to research published last year in Personality and Social Psychology Bulletin. When students were given creativity tests, those whose test-cover pages had a green background gave more creative answers than those whose pages were white, blue, red or gray. Many see green as a symbol of fertility, growth and renewal, triggering the positive mood and striving for improvement that fosters creativity, says the study, led by researchers at University of Munich in Germany. (A 2009 study linked the color blue to increased creativity, but researchers on the latest study explained the disagreement by saying they controlled their results more carefully for the lightness and vividness of the colors used.)

Mind-wandering, often seen as daydreaming, allows the brain to incubate new approaches to familiar problems, serving "as a foundation for creative inspiration," says the 2012 study in Psychological Science. In a test of creativity, researchers asked 145 students to think of as many unusual uses as possible for such common items as a brick or toothpick, then divided them randomly into four groups. Three groups were given a 12-minute break with different assignments; a fourth group kept working. When all the students tackled the same problems a second time, those who had done a simple, boring task during a break had more creative ideas than those who were assigned a tough cognitive puzzle, those who rested, or those who didn't take a break, says the study, co-authored by Jonathan Schooler, a psychology professor at the University of California at Santa Barbara.

Another tactic: Build time for mind wandering into daily routines, breaking away from tasks requiring concentration to take a walk or run, look out a window or do some relaxing, routine physical task.

Atlanta ad executive John Stapleton had been trying for three weeks to come up with advertising ideas for a client, the Costa Rica Tourism Board, to encourage people to visit the Central American nation. But it wasn't until he got out of his Atlanta office, traveled to the Costa Rican rain forest (at the Tourism Board's invitation) and relaxed on his patio at a resort that he got the idea of making an ad based on something other than words. A storm was approaching, and "all the howler monkeys started woofing like dogs, and the rain forest came to life," he says.

He and his colleagues developed an iPad app enabling users to create their own jungle music, syncing the sounds of howling monkeys, frogs, rain, fish and streams into a rhythmic symphony, free for children and potential adult visitors to download as a window into Costa Rica's biodiversity.

To hatch the idea of illustrating biodiversity via music, "a key factor was to get away from juggling accounts and being constantly distracted, jumping from one task to the next," says Mr. Stapleton, chief creative director at the ad agency 22squared.

Moderate drinking can also relax inhibitions in a way that seems to let the mind range across a wider set of possible connections. It can also help a person notice environmental cues or changes that a sober brain would block out, Dr. Wiley says. In a 2012 study at University of Illinois at Chicago, students who drank enough to raise their blood-alcohol level to 0.075 performed better on tests of insight than sober students. Other research suggests watching funny videos can spark the positive moods linked to higher creativity.

Priming the mind with a wide range of experiences and input also helps. Tor Myhren, an ad executive credited with many successful campaigns including the ETrade talking baby, says he uses "massive creative stimulus followed by total solitary confinement" to start ideas flowing. Anticipating a period of hard work recently, he read "Wired" magazine cover to cover, then went to see "Django Unchained," says Mr. Myhren, president and chief creative officer of Grey New York. "When I set my brain up properly for it, when I've fed my brain properly, I can do it."

He wrote some of the talking-baby scripts while working alone late at night in his office, sipping a little Oban whiskey and listening to Radiohead on his iPod, he says. For him, "an idea isn't just a lightning-bolt thing. I have to work at it."

Entrepreneurial people, for example, "have ideas about everything all the time," says Jonathan Kaplan, inventor of the Flip pocket camcorder, an idea that sparked a boom in personal videos a few years ago. "We always think we're right and always think it's possible to do them," says Mr. Kaplan, who is now chief executive of a company based on his latest idea, The Melt, San Francisco, a high-tech restaurant chain offering healthy comfort food.

Straying from your field of expertise can help, studies show. Market-research executive Sterling Lanier was looking for successful new ideas a few years ago. "I was in Death Valley from 2007 to 2010, thinking, 'Maybe I lost it,'" he says. "Then I relaxed a little, went out to lunch, started telling stories while drinking beer" with a friend, a cancer epidemiologist. "She started complaining about all the problems she had" getting research subjects to fill out arduous, 400-question medical surveys, Mr. Lanier says.

Then came his light-bulb moment: "You have to make it entertaining. Why don't you just make it super fun and friendly on the iPad?" he asked. By applying market-research techniques to a new field, he came up with a colorful, gamelike medical questionnaire that became the basis for the new company he heads, Tonic Health of Palo Alto, Calif.; the product is being used at a growing number of research hospitals and clinics. To have a good idea, Mr. Lanier says, "you have to be able to float through your environment with your antennae up, like a butterfly, and just let things ping your antennae."

This copy is for your personal, non-commercial use only. Distribution and use of this material are governed by our Subscriber Agreement and by copyright law. For non-personal use or to order multiple copies, please contact Dow Jones Reprints at 1-800-843-0008 or visit www.djreprints.com.