All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Using drugs to anesthetize patients in order to facilitate operations is lawful if the operation itself is necessary and not against the Sharia.
In fact, anesthetizing patients who are undergoing an operation is necessary to prevent them from moving back and forth as this could hinder the doctor from doing his job.
The rule is the same for topical and general anesthesia. This fits under the Sharia rule that 'the necessity makes lawful the forbidden things'. Many ancient scholars mentioned that using anesthetics and sedatives when necessary to facilitate an operation is lawful.
Imam An-Nawawi said: ‘And if there is need to cut off the fretted hand of a person, it is lawful to use something that make him lose his consciousness’. Another Malikite scholar said: ‘It is clear that giving someone some somnificient (inducing sleep) in order to be able to cut off a deteriorated organ is lawful as the consequences of not cutting the organ are worse than those of letting the person drink a somnificient’.
Imam Alaadin Al Hambali said: ‘Consuming something that causes unconsciousness for no legal necessity is the same as consuming alcohol’. Seeking cure is a necessity.
So, all the sayings of these scholars are enough evidence that using anesthetic for cure is lawful.
For more details please read “The rules of surgical operations and the effects that result from it”. [Arabic] Written by Dr. Mohammed Bin Mohammed Al Moctar Al Shingity.
But the lawfulness of using anesthetic in surgical operations is restricted to the minimum necessary and the rule of any surplus of this product is prohibition. There is a general rule in Sharia that stipulates that anything that is made lawful for a necessity should be used only to the extent needed by that particular necessity, no more.
As for the sedatives used for reducing pain or helping people who suffer from insomnia to get some rest, there is no harm in prescribing them unless they cause bad side effects. In this case, it is left to the specialist to decide on the extent of the side effect and act according to Sharia rules concerning the necessity as explained earlier.
Allah knows best.