You expect to yawn when you’re bored or tired—not when you’re at the gym.  But if you find yourself yawning between sets of deadlifts, it may be your brain’s way of cooling down your body, reports a Physiology & Behavior study.

Yawning not only increases the amount of blood traveling to your brain, but the extra air also lowers the temperature of that blood, says study co-author Andrew Gallup, Ph.D.

You can think of it as your brain’s natural air conditioner. As your body heats up during exercise, your brain combats the warmth by triggering a yawn, he says.

The amount you yawn will depend on the temperature in which you’re in, though. The study participants yawned the most when they were in moderate climates.

According to the researchers, your noggin won’t need to cool itself down if it’s too cold because it’ll be putting all of its effort toward warming up. And if it’s too hot, the air you take in won’t be chilly enough to effectively cool the blood heading to your brain.

The type of exercise may also affect how much you yawn, says Gallup. When you do a vigorous workout or perform movements that attack big muscles like squats or deadlifts, you quickly raise your body temperature. As a result, you yawn.

But your brain may also prompt a yawn because the exercises are diverting a large amount of blood to your working muscles and it wants to reclaim some of that blood flow, he explains.

Yawning seems to have a twofold effect, although more research needs to be done to know for sure.

A few yawns during a workout aren’t anything to worry about. However, if you are excessively yawning or it is interfering with your routine, take a break. It could indicate an oncoming panic attack or dizzy spell, says Gallup.

You should also see a doctor, as too much yawning can sometimes point to a bigger body temperature or blood flow problem, he says.