The diving reflex is an involuntary response that optimizes respiration to allow mammals to stay underwater for extended periods by reducing the heart rate and redirecting blood flow to essential organs. This reflex is more pronounced in aquatic mammals but is present in humans, especially noticeable in children and during cold-water immersion.