I work in an unpressurized aircraft at altitudes where the atmospheric pressure is low enough that oxygen is required. Between 10,000' and F180 (about 18,000') I wear a nasal cannula: an arrangement of tubes, including two blowing oxygen up my up my nostrils. Above FL180 I wear a mask that covers my nose and mouth. I could skip the cannula and wear the mask any time I was above 10,000' but I can't eat or drink while wearing it, so it gets old fast. Plus the design of the cannula is such that it recycles exhaled oxygen, meaning that the oxygen supply lasts a lot longer on cannulas. Thus we only use the masks if we're working above 18,000'.
Putting the mask on involves taking off my headset, putting the mask over my face, pulling the head strap into place, putting the headset back on, and fastening another mask strap behind my neck. Finally I have to swap the microphone plug for the headset boom mike with the microphone plug for the in-mask mic. I can do all this before take-off, which I will if I'm in busy airspace. I started up next to a military jet once and noticed its pilot put on his oxygen mask before start up. If I am in uncontrolled airspace, I typically put my mask on just before I climb through 10,000'. If I'm expected to be monitoring a frequency, I wait until a needy or slow-talking pilot starts to make a call irrelevant to me, and then I can get the headset off, mask on, and headset back on before the call is over, ensuring I don't miss any calls. It takes less than thirty seconds. On descent, I can use the same technique, or just leave it on until I park, likely confusing the FBO marshallers.
Sometimes the day starts out with an hour of work at at 20,000' and then progresses to three more at 15,000'. Obviously I need the mask for the high level work, but would prefer to be able to eat and drink for the rest of the flight. In this case the swap involves all of the above, plus disconnecting the mask from the oxygen receptacle, connecting the cannula, and putting the cannula in my nostrils. It looks just like the cannulas the patients in House wear, but rather than looping around my ears and hanging down in front, it just goes around my head, held up by my headset earcups, and secured in place with a baseball cap. The point of this post is that I think about perfecting the swap between oxygen supplies at altitude. Should I breathe normally, or hold my breath during the swap?
The way breathing works is that the partial pressure in the air I inhale is greater than that in the lung capillaries it is in contact with. The imbalance causes oxygen to diffuse into the capillary, until the partial pressures are equal, the way any gas does across any membrane. So if the partial pressure in the ambient air is less than that of my lung capillaries, the act of breathing will actually decrease the oxygen level in my blood, and it would be better to hold my breath while I switch between mask and cannula.
The partial pressure of oxygen in ambient air at sea level is 21% of 29.92 inches of mercury, which is 6.28 inches of mercury. I'm going to convert that 160 mm Hg, not because I'm obsessed with metric, but because Wikipedia gives me biological numbers in millimetres of mercury so I have to convert one of them in order to do the math. At 18,000' the partial pressure of oxygen in the ambient air is half that at sea level, so 80 mm Hg. The partial pressure of oxygen in lung capillaries at sea level is 20-40 mm Hg, and as the mask maintains my blood oxygen at the same saturation as at sea level, then that's the partial pressure of oxygen while I'm wearing an oxygen mask. Eighty is clearly greater than forty, so even at 18,000' breathing is better than holding my breath to maximize blood oxygen during the mask swap.
So at what altitude should I hold my breath? At 32,800' the partial pressure of oxygen in the atmosphere is 25% of the sea level pressure, which is 40 mm Hg, the top of the range for lung capillary pressure. I would say, "so up to 32,000 it's better to breathe than hold one's breath when swapping oxygen sources" but above 32,000' the time of useful consciousness without oxygen is around a minute, even with no physical activity, so one shouldn't be messing around with one's oxygen source at such altitudes. But my conclusion is that above that, hold your breath for those few seconds of scrabbling before you either get your oxygen on or forget how and pass out.
I only took biology to about grade eight, so most of what I know about the human cardiovascular system comes from lifeguard class. I welcome any corrections to this analysis, even if you're stopping by years after I wrote it.