Quick quiz. Which leaves you feeling more content?

A. Checking items off your mental to-do list.

B. Watching soap suds swirl down the drain as you wash the dishes.

Correct answer: B.

Despite the fact that we spend nearly half our waking hours thinking about something other than what we're doing, we're actually happier when we focus on what's happening in the moment. The way we direct our brains can help us manage pain, as well. And new findings suggest that spending time in a focused state may even increase gray matter, boosting areas of the brain involved in mental sharpness.

Harvard researchers noted the happiness factor last November, when they enlisted 2,250 study participants to record their thoughts and feelings immediately after being buzzed several times a day on their iPhones.

The study, published in the journal Science, found that the human mind wanders during virtually every activity - especially boring ones like driving in traffic or taking a shower - and that even when we reminisce about a joyous occasion, we feel no better than when we pay attention to those dish suds. When our thoughts turn to unpleasant or even neutral topics, like picking up the dry cleaning, the suds win out.

To help us plan for danger and learn from the past, the human brain's default mode of operation evolved to be one of contemplation, brain researchers have shown. In order to be truly present in the moment, we have to make a concerted effort, a practice called mindfulness.

Based on 2,500-year-old Buddhist principles, mindfulness programs in the West are largely secularized and often involve using meditation to help people become more attentive to moment-by-moment sensations, like frigid wind across the T tracks or fingernails scratching on a blackboard, without judging them. While one of the first mindfulness stress-reduction classes began at the University of Massachusetts back in 1979, the practice has spread in recent years to virtually every realm of medicine, to help patients better manage chronic pain, depression, even overeating. A December study published in the Archives of General Psychiatry found that mindfulness therapy can be as effective as remaining on antidepressants to prevent a relapse of depression.

The latest evidence suggests that the practice of paying attention leads to anatomical changes in the brain. Healthy volunteers given MRI scans both before and after they attended weekly mindfulness classes for eight weeks experienced a 1 to 3 percent increase in their brain's gray matter in particular areas responsible for learning, memory, and emotional regulation, according to a Massachusetts General Hospital study published last week in the journal Psychiatry Research. Two years earlier, the same researchers found that mindfulness training led to a decrease in gray matter in the brain's amygdala, the area of the brain that perceives stress.

"We don't yet know what these brain changes mean,'' points out study coauthor Sara Lazar, a neuroscientist at Massachusetts General Hospital, "but the part of the brain that grew a little involves perspective taking - seeing other people's point of view and also the big picture.'' That's a central tenet in mindfulness: allowing yourself to be open to new experiences. "It's all about adopting a receptive attitude: paying attention to how things are rather than how you want them to be,'' says Ronald Siegel, an assistant clinical professor of psychology at Harvard Medical School and author of "The Mindfulness Solution.''

After learning to practice mindfulness years ago, Siegel says he no longer walks without noticing the movement of his body. "Walk slowly and bring the full attention to the sensations of your feet lifting, moving forward, and stepping,'' he says while inching forward on a brick sidewalk in Cambridge on a chilly January afternoon. "Of course, thoughts will enter your mind, but the idea is to step out of the thought stream and come to the actual sensations of life.''

Tim Blackburn, a patient of Siegel's from Jamaica Plain, found that learning to walk mindfully helped him overcome prolonged back pain that forced him to give up running 10 years ago. "I described my pain as I walked - how it went from my thigh to my knee to my shin - and it really helped me be present with the pain instead of clenching against it, thinking that it would never go away.'' The walks led to painful 200-yard jogs and within two months, without taking medications, the now-54-year-old graphic designer was back to running five miles, eventually pain-free.

Now meditating weekly at the Cambridge Insight Meditation Center and attending annual silent meditation retreats, Blackburn says learning mindfulness helped him manage far more than his physical discomfort: "Sitting with my own thoughts and emotions made me more patient and compassionate with other people; it improved my relationships.''

Mindfulness training can be learned on its own in, say, the eight-week University of Massachusetts Medical Center program (which costs $450 to $600, based on financial need) - the one Lazar and her colleagues studied - or woven into other stress-reduction programs like the $400 eight-week relaxation response resiliency program at Massachusetts General Hospital, which aims to benefit anyone suffering not only from headaches, anxiety-related conditions, and sleep problems, but also autoimmune disorders, asthma, and allergies.

"It includes mindfulness, but also visual imagery techniques, exercise, and a change in diet,'' says Peg Baim, a nurse practitioner who serves as clinical director of the resiliency program. She says she went through the program herself years ago to help her manage her panic disorder and Graves' disease, an autoimmune disorder. "I was a hyper-responder with an over-reactive stress response,'' she explains. "Meditation helped me better regulate how my body responded to pain and emotional stress.''

At Boston Medical Center's nutrition and weight management class, Mitali Shah, a registered dietician, emphasizes the importance of mindful eating to control weight and improve weight-related conditions like diabetes and heart disease. "We make about 200 uncontrolled food decisions in a day, where we don't think about what we're actually eating or drinking,'' she tells a group of seven overweight patients at their weekly session in January. She extols them to eat only when they're hungry, maintain set meal and snack times without distractions like TV or phone calls, and consume small portions every two or three hours. "If the thought of food makes you want to eat,'' Shah points out, "that's appetite, not hunger.''

After rating their current state of hunger on a scale of 1 - beyond starving - to 10 - painfully stuffed - the group confronts a single raisin. "Look at it, smell it, now put it in your mouth, but don't chew yet,'' orders the trim, well-coiffed Shah. "Close your eyes and just focus on the raisin. Notice the texture, the temperature, and the taste. We tend to overeat when we don't focus on our food.''

Margarita Lebron, a 53-year-old participant from Dorchester, says the exercise made her a believer: "For the first time, I got the taste of a raisin. Usually I just pop them in and don't put any mind to the flavor. But this time I enjoyed eating just one.'' Overweight most of her life, she decided last month to take steps to change her eating habits - her goal is to lose 50 pounds - after her doctor told her she was on the borderline of diabetes. "It's like a new beginning; hopefully I'm on the right path.''