Painkillers you can get without a prescription—like acetaminophen, as well as ibuprofen, naproxen, and other so-called non steroidal anti-inflammatory drugs (NSAIDs)—are generally pretty safe. That’s why they are available over the counter to relieve mild-to-moderate pain from headaches, sore muscles and achy joints. But if they’re used more frequently, or over long periods of time, they may pose dangers to the heart, kidneys, bone and even hearing.

More studies are documenting harms from the consistent use of NSAIDs, especially before or after workouts to ease sore muscles and reduce joint pain. Doctors are learning that regular reliance on the painkillers may contribute to serious and surprising health issues.

The most concerning of these involves the heart. Studies have found that high doses of NSAIDs increased risk for heart attack and other heart problems by one third; ibuprofen, in particular, more than doubled the risk of a major heart event. Another recent study involving 10 million people found that those currently taking an NSAID had a 19% higher risk of being hospitalized for heart failure compared to those who had used the drugs in the past. (NSAID users are also more likely to have intestinal bleeding, a side effect of the drugs.) Research like this was compelling enough to move the Food and Drug Administration in 2015 to include stronger warnings about heart risks on the labels of the drugs.

The heart isn’t the only thing at risk. When researchers studied more than 55,000 women in the Nurses’ Health Study, they found that people who regularly used NSAIDs over six years had a 10% higher risk of developing hearing loss compared to people who didn’t use the drugs or took them less often.

“People need to be more aware of the potential downsides of long-term analgesic use,” says Dr. Gary Curhan at Brigham and Women’s Hospital, who led the hearing loss study.

MORE: If You Take Ibuprofen Often, Read This

Because NSAIDs are available without a prescription, it’s easy to assume that they don’t pose a health risk. The drugs’ over-the-counter status has led to complacency about their potential adverse effects.

That seems to be especially true for people who pop NSAIDs before or after exercise. Some people take the medications before long runs or gym sessions to try to prevent sore muscles, while others take them immediately after a workout to reduce inflammation in joints. But in a study published in 2016, scientists found that doing so may actually promote bone breaks. Saija Kontulainen, a professor of kinesiology at the University of Saskatchewan, in Canada, and her colleagues studied a group of 90 older people who were randomly assigned to either resistance training or a stretching regimen and who took either ibuprofen or a placebo immediately after they exercised. When they studied scans and other measurements of the bone and muscle, they found that people who took NSAIDs just before they did resistance training experienced more bone loss than those who did not use the drugs.

MORE: Just How Unsafe Are Painkillers?

Kontulainen says the drugs work by reducing inflammation, and that helps keep bone from breaking down. But pain relievers like ibuprofen also affect a group of chemicals called prostaglandins, which help to build bone.

Weight training exercise can boost prostaglandin production, and while it can’t build more bone, it can prevent loss of bone that can lead to osteoporosis. NSAIDs, on the other hand, inhibit the release of prostaglandins, so taking an NSAID just after weight training may cancel out any beneficial effect on the bone. “NSAIDs shut down the favorable mechanism of prostaglandin synthesis that’s needed for bone formation,” she says. “You lose that benefit to the bone, so the bone is pretty much the same as if you did no weight training.”

The best way to take ibuprofen to relieve exercise pain, she says, is to space the drug and the exercise session at least several hours apart. It takes about two hours to clear about half of the consumed dose of medications like NSAIDs, so she says taking the drugs in the evening before a morning workout, or in the morning before an afternoon session, makes the most sense.

If you need to take an over-the-counter- pain reliever for any reason, it’s worth remembering that even if they don’t require a prescription, they’re still drugs—and all drugs have side effects.

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.

Contact us at letters@time.com.