This information is all strictly for Entonox - a brand of analgesic gas comprising 50% Oxygen (O2) and 50% Nitrous Oxide (N2O), Laughing Gas. This mixture is known as 'Gas and Air' and is in very common use.
The active ingredient in Entonox is of course the nitrous oxide, so the discussion of the mechanism below refers solely to the N2O as you asked for.
Nitrous oxide enters the blood by diffusion from the alveoli whilst it is being inhaled, but does not bind with hameoglobin. It is fat soluble so quickly moves into cells, including synapse ends in the brain. Because of the stability of the compound, N2O is not metabolized by the body so has its effect as that molecule, then is eliminated by diffusion out of the lungs once inhalation has ceased (taking roughly 2 minutes for on and offset).
According to the material that BOC pharmaceuticals provide, the exact mechanism of the analgesia is not fully understood. It is known, however, to induce "inconsistent changes in the basal levels of thalamic nuclei".
N2O inhibits NMDA receptors in the brain whilst simultaneously encouraging the stimulation of the parasympathetic GABA receptors. This eventually produces an anaesthetic effect. It is also understood that N2O promotes the release of endogenous opioid neurotransmitters ('natural painkillers' e.g. 978
endorphins) that specifically activate descending pain pathways. This inhibits the transmission of pain. In this way the analgesia provided by nitrous oxide is antinociceptive (literally pain reducing) rather than a generalised limbic depressor.
However, nitrous oxide also positively effects potassium ion channels too - reducing the chance of an action potential being generated in affected neurons. Research into this area of the effects of N2O is ongoing.
Euphoria is a common side effect of N2O usage, hence the name laughing gas. This is as part of wider emotional changes that can occur when nitrous oxide is being administered. For example, some people instead of laughing become scared or in other cases extremely agressive towards those nearby. The precise mechanism for these disinhibitions is again not fully understood.
Whilst it seems a lot of the answers are missing, the course I'm taking this information from is available online at Discover Entonox - modules 8-10 have relevance to this question. It's free to register and view the materials, they're all nicely narrated with diagrams etc. 978