It's not unusual for people to have a "Damascus moment" after a narrow escape from death or danger. It's not a rational process; it's a great emotional upwelling or relief, joy, surprise, humility and gratitude. It's purposeless and undirected, so it spontaneously goes toward whatever supernatural entity is central to the belief system of his society.
Of course, the religious community welcomes the convert and makes him feel cherished, important, consequential - all of which feels good to him, and is, with the collusion of the community, attributed to the deity. The unconsidered inclination to believe is reinforced and rationalized, and veiled in a tacit agreement never to scrutinize it too closely.