Sex, one of the more pleasurable forms of exercise, can do some wonderful things for your health, from strengthening your muscles to improving immunity. An erotic romp might also have the power to elevate your consciousness, suggests a small new study.

The research, published in the journal Psychology of Consciousness: Theory, Research, and Practice, looked at BDSM, a consensual practice of bondage/discipline, dominance/submission and sadism/masochism. BDSM experiences can involve handcuffs or other ways to restrict movement, it may involve the administration of pain with things like clothespins, spanking or verbal aggression—and sometimes, though not always, it also involves intercourse.

According to the researchers, people in the BDSM community often talk about being transported into a state of flow: “the idea that the rest of the world drops away and someone is completely focused on what they’re doing,” says study author Brad Sagarin, professor in the department of psychology at Northern Illinois University. The flow state is familiar to pro athletes, prolific novelists, musicians—anyone who loses themselves in an activity they’re extremely good at.

Cracking a whip and scoring a touchdown might not seem like comparable skills, but they both require intense focus to make sure it’s being done effectively and safely, Sagarin says. It’s that fierce concentration that invokes this mental state, researchers suspected. To find out, Sagarin and his colleagues recruited seven couples who practice BDSM from across the sexuality spectrum. Two couples were in a long-term relationship, two were in polyamorous arrangements, two pairs were friends, and one pair met the day of the study.

Get our Health Newsletter. Sign up to receive the latest health and science news, plus answers to wellness questions and expert tips. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

The researchers randomly assigned a person in each pair to the “top” role—the person who gives orders—or the “bottom” role, the one who follows them. Each engaged in BDSM for as long as they wanted—most encounters lasted about an hour—while the researchers watched and marked down what sorts of activities were happening. Before and after each session, researchers measured the participants’ cortisol levels and testosterone while also taking stock of their mood, level of stress, their sense of closeness and whether or not they were experiencing mental flow.

After the encounter, people reported lower stress, better mood and scored a high level of flow on a scale that measures flow state. “This may be an effective thing for people who otherwise have a hard time getting out of their intellectual head,” Sagarin says. “BDSM, because of the intense sensations and potentially because of the restriction of movement, may have the ability to put someone in the here and now in a way that they may find more difficult to achieve through other means.”

To those familiar with the no-judgment, stay-in-the-present-moment concept of mindfulness, that may sound familiar. Other research is looking at how mindfulness may change the way people in the BDSM community experience pain by “really tuning into it, fully feeling the sensations and translating it into pleasure,” says Lori Brotto, a psychologist and professor in the department of obstetrics and gynecology at the University of British Columbia (who was not involved in the new research). Just as mindfulness has been shown to help people feel less physical pain, it may work similarly in the BDSM community as well as for women who have clinical genital pain, which is a primary research focus for Brotto.

Scientists are studying mindfulness as a tool to improve everything from eating habits to children’s behavior and academic performance, and a few researchers, like Brotto, suspect that level of tuning in and focusing can improve the kind of sex that doesn’t involve pain, too. One Brotto study earlier this summer in the Journal of Sex Research found that when women with low desire did an eight-session mindfulness course designed to help them tune into their body, they reported significant improvements in sexual desire, sexual function and stress around sex. “Mindfulness helps people become just more generally aware of their body and their body sensation,” says Brotto. That awareness, plus the proven stress-relieving effects of mindfulness, conspire to make sex better.

More research is needed to determine whether regular old sex can tip you into a flow state, says Sagarin. But focus and practice may be able to get you there. “I think that BDSM is one path to altered states of consciousness, but there are many other paths,” he says. “If someone were engaging in sex in a way that they were working hard on their performance and diligently trying to cut out the rest of the world, it’s certainly possible that they could get into a state of flow.”

Write to Mandy Oaklander at mandy.oaklander@time.com.