During Wars it has commonly been said among the Soldiers "their are no Athiests in Foxholes." So these men who may die soon pray to a God they didn't believe in just in case it "helps" them not get hit by a stray bullet or Mortar...is this a human fear condition.
Other example is people "converting" on the death bed...Constantine and Oscar Wilde {homosexual} comes to mind.