Yes, some pain medications can affect testosterone levels.
Opioid medications, such as morphine, codeine, and fentanyl, have been shown to decrease testosterone levels in men. This effect is thought to occur because opioids can suppress the release of luteinizing hormone (LH) and follicle-stimulating hormone (FSH), which are hormones that stimulate the production of testosterone.
Nonsteroidal anti-inflammatory drugs (NSAIDs), such as ibuprofen and aspirin, have also been shown to affect testosterone levels. Some studies suggest that long-term use of NSAIDs may lead to a reduction in testosterone levels in men, although the evidence is not yet conclusive.
It is important to note that the effects of pain medication on testosterone levels can vary depending on the type and dosage of the medication, as well as individual factors such as age, health status, and genetics. If you have concerns about the effects of pain medication on your testosterone levels, you should speak with your healthcare provider.