Prescribing pain medication properly is not illegal. It is not illegal or unethical for doctors to prescribe enough medication to relieve pain and other symptoms of dying patients where the intent is not to kill the patient but to relieve suffering. Taking meaningful steps to relieve pain is not murder. Terminal sedation is a consciously induced coma during which feeding and nutrition are foregone by the patient. Ethicists and all of the major religions make a clear distinction between relieving pain and assisted suicide or euthanasia.
Terminal sedation is perhaps the compromise alternative to physician-assisted suicide.
It allows a suffering patient to sleep through the period until natural death occurs. Ethical issues in terminal sedation center primarily on when it is appropriate. This approach appears to focus on the imminence of death than the cause of suffering. The practice was indirectly approved by several Supreme Court justices in the context of the court's decisions on physician-assisted suicide. It was painted as an explanation of why assisted suicide was not an essential component of the right of privacy.