For a society beset by opioid addiction, it’s not always easy to find the cure for what ails you.

State and federal officials and some insurance companies, trying to do their part to curtail painkiller abuse, have begun to restrict the amount of drugs containing opioids that doctors prescribe for patients.

They are responding to an epidemic of heroin and painkiller addiction that has swept the nation, including Massachusetts, ruining many lives and claiming far too many. In 2014, the state Public Health Department estimated 1,174 people died from overdoses related to opioid drug use, the fourth consecutive year such deaths had risen. Nationwide, about 25,000 people died of unintentional overdoses.

The U.S. Centers for Disease Control recently released new guidelines that recommend using less-powerful painkillers or non-pharmaceutical methods of pain management like yoga or physical therapy before resorting to opioids — and prescribing fewer painkillers in cases where a drug is needed. The state Medicaid program for the poor and disabled has gone beyond that advice and has cut in half the maximum amount of painkillers it will cover per day (unless a special waiver is granted by the Department of Public Health).

We understand the devastation heroin and improperly used painkillers can wreak on individuals, families and the community. We support current government efforts to address the problem, especially by helping addicts get off and stay off drugs through short- and long-term rehabilitation. And we support state efforts to cut down on painkiller abuse by making it harder for addicts to shop around for multiple doctors who will prescribe pills for the same ailment. But we urge caution when forcing doctors to potentially halve a patient’s painkiller dosage. We agree with local addiction specialist Dr. Ruth Potee, who said recently that the push to limit prescriptions has too broad a focus, at the risk of harming patients who benefit from the painkillers.

MassHealth allows waivers to its painkiller limits, but so far the process seems to be cumbersome for at least some patients, requiring detailed paper medical records and justification sent to state health officials. Earlier this month MassHealth reported that 1,242 waivers had been submitted since the limits took effect in March and that 75 percent were approved, most within 24 hours of receiving the paperwork. That sounds reasonable, but in many cases, the paperwork submitted by the prescribing doctor was incomplete, requiring days or weeks of back and forth communications. Meanwhile, chronic pain patients were forced to suffer.

In Monday’s Gazette, Dr. Stephen Martin recounted the trouble a patient of his had in getting a prescription filled. It took nearly two months to get the necessary MassHealth approval and then there were problems at the pharmacy.

In most cases, determining the dosage of painkiller should remain a doctor’s decision, even though people are coming to realize that we have been perhaps too quick to resort to powerful drugs. Some reasonable overall limits are probably worthwhile to stem the flow of these dangerous drugs into communities. But the process for getting waivers should be made as painless as possible for those who truly need opioid prescriptions for chronic conditions that can’t be treated otherwise, and we encourage those at MassHealth to adjust regulations accordingly.