Why can one fly and dive in the same 24 hour period?
When diving below the surface for any period of time, nitrogen in the compressed air you breathe will absorb into your bloodstream. If you were to travel on a flight soon after that, the reduced pressure in the aircraft cabin could cause “the bends”, where the nitrogen would be released from your blood and form bubbles in your blood vessels, which is at least extremely painful and at worst can be fatal. When you return to the surface from diving, the nitrogen absorbed in your blood will slowly be exhaled over the next several hours. Then it is safe to travel on an aircraft. This is why the 24 hour air travel restriction is suggested.