When respiration occurs with insufficient oxygen, the substance that accumulates in muscles is lactic acid.
This is because when the supply of oxygen is less than the demand, tissues in animals undergo anaerobic respiration. This leads to the accumulation of lactic acid in the tissues. Lactic acid can cause fatigue and result in muscular cramps.
For example, when a short-distance runner or driver holds their breath while running or diving, lactic acid builds up in their muscles. To get rid of the lactic acid, the body incurs an oxygen debt, which is the additional oxygen required to eliminate the lactic acid from the body tissues.
This oxygen debt can be paid back by breathing more quickly and deeply during the recovery period after the physical activity.