Maybe, but what would you recommend instead?
The usual painkillers are more addictive, have worse side effects (which is why they cannot be used as frequently as the patients would need), and they also get stolen by people working in medicine for recreational purposes.
One possibility is medical marijuana, with sufficient precautions that it stays medical. I don't know exactly what level of precautions would be optimal, but you could do a lot better than we have now.
Over at Scott Adams' Blog you can find a very fine example of using the 'Rationality Engine' to solve the social problem of assisted dying.