FWIW, nitrogen asphyxiation is one of the methods that’s preferred by advocates of assisted suicide. Done correctly–by which I mean in a way that doesn’t allow a buildup of CO2 in your bloodstream–it’s not only painless but gives you a mild high. The proper way to do it is with something like a BiPAP, where the air that’s being piped in is pure nitrogen, and the CO2 is all being removed immediately so you aren’t breathing it back in. Without a buildup of CO2 in your bloodstream, your brain doesn’t recognize that you’re suffocating.
Have you ever breathed in helium from a balloon and gotten lightheaded? It’s about like that.
I’m in favor of the death penalty in very, very rare cases–and this is not one where I would support it–and this is one of the surest, least barbaric ways to execute someone.