https://en.wikipedia.org/wiki/Diving_reflex
The diving reflex, also known as the diving response and mammalian diving reflex, is a set of physiological responses to immersion that overrides the basic homeostatic reflexes, and is found in all air-breathing vertebrates studied to date.
[...]
The diving reflex is triggered specifically by chilling and wetting the nostrils and face while breath-holding, and is sustained via neural processing originating in the carotid chemoreceptors. The most noticeable effects are on the cardiovascular system, which displays peripheral vasoconstriction, slowed heart rate, redirection of blood to the vital organs to conserve oxygen, release of red blood cells stored in the spleen, and, in humans, heart rhythm irregularities.
Emphasis added. Since we've been able to observe it in all studied air-breathing vertebrates, it's likely (to the point of near certainty) that it comes from those "fish [ancestors]" you mention in your title. Pedants may nitpick the phrasing. Can't say whether that's less, more, or just as responsible for waking a person up vs. other environmental changes (e.g. loud noise, sudden motion, smell of smoke) that might startle a person into alertness though.