In a reflexive manner.
By reflex, automatically, without conscious thought.
Reflexively he opened his mouth to breathe, forgetting he was underwater.