Helium asphyxiation is just as effective and makes for much funnier last words.
Nitrogen is cheaper. It is (or was once) used to euthanize stray dogs. It’s quite safe as there are no toxins used. Respiratory distress is caused by the inability to remove CO2 from the blood stream. Barometric chambers used to train flight personnel cause hypoxia, and I know from personal experience it is quite painless. (The Bends-like after effects can be annoying, but Nitrogen hypoxia will not cause that, and the convict will not be around to experience it anyway.) Hypoxia is not only painless, it produces a pleasant feeling of intoxication. Of course, knowing that you are gulping your last breaths may be a real buzz-kill.
I dealt with an OD from Nitrous oxide. He never knew it was coming and died quietly.
LOL.
But Helium is quite expensive.
Nitrogen is cheap and nonpolluting.
LOL!