A shallow water blackout is loss of concoisness caused by cerebral hypoxia. The hypoxia is often caused by hyperventilating on purpose before diving.If the CO2-content of the blood rises this normally triggers a progressively stronger respiratory reflex. The urge to breathe grows so strong, that respiration happens before loss on conciousness occurs. In purposeful hyperventilation the CO2-content of the blood is reduced, and this reduction is much larger that the increase in oxygen.
With the resperatory reflex turned off, oxygen saturation of the blood can sink far enough that loss of conciousness occurs before the urge to breathe gets so strong that respiration happens automatically.If a person is under water when this happens that leads to water aspiration when the loss of counciousness then triggers the respiratory reflex.