It seems like when the Olympic athletes aren’t racing, they’re all listening to music. Do they do it to drown out the crowd, or does listening to music make them faster?

Make like an Olympian and strap on your Beats headphones whenever you can. Studies have shown that listening to uptempo music before, during, and after a race can have positive effects on performance in both power and endurance events. But there are conditions.

Let’s start with your warm-up. A 2012 study published in the International Journal of Sports Medicine found that athletes who listened to music during a 10-minute cycling warm-up had a significantly higher power output during a subsequent all-out sprint than athletes who didn’t listen to music. The study also found that athletes perform better at 5 p.m. than at 7 a.m., leading researchers to believe that the boost athletes get from listening to music while warming up is especially helpful at morning competitions.

Two more recent studies showed that listening to music while racing or working out can also improve performance. The first found that swimmers who listened to music while in the pool (they used the SwiMP3) time trialed significantly faster than they did without music. The second found that runners who listened to music during the beginning of a 5K were able to run faster, but felt about the same level of discomfort and fatigue as when they were running slower, without music.

Finally, listening to music might even help you recover faster. Researchers at Israel’s Bar-Ilan University found that athletes who listened to motivational music (the kind that makes you want to work out) moved around more during recovery, and decreased their blood lactate levels and rate of perceived exertion faster than when they recovered music-free.

A few words of caution: pick your music carefully. Up-tempo is the way to go. You’ll likely work harder and enjoy the music more when it’s played at a faster tempo, and has a good beat. And if you want the most enjoyable workout possible, don’t drag yourself to that 7 a.m. spin class if the instructor’s music stinks. A workout done to music you hate will likely feel harder to you than if you weren’t listening to music at all. But you probably didn’t need the researchers at Brazil’s Sao Paulo State University to tell you that.