The problem with using anesthesia is that organizations (the largest of which is the EU) forbids selling anything used in executions. So states that use anesthetics to execute the condemned will find they may be then unable to purchase the same anesthetics for use in hospitals. Nitrogen, being ~80% of the atmosphere, can't possibly be restricted.
FWIW I am completely against capital punishment, and for why one need look no further than the recent admission by the FBI that they were biased to decide a match in forensic hair analysis, which may have led to up to 14 wrongful executions. However some barbaric states are just going to continue to do it anyways, so they may as well do is as humanely as possible.