“There are no atheists in foxholes” isn’t an argument against atheism, it’s an argument against foxholes.
James Morrow (b. 1947) American author, humanist
Towing Jehovah, Part 2, “Famine” (1994)
(Source)
Paraphrase of this passage:"There are no atheists in foxholes, people say, and it's so true, it's so fucking true." Cassie swallowed, savoring the aftertaste of the Cheerios. "No ... no, I'm being too hard on myself. That maxim, it's not an argument against atheism -- it's an argument against foxholes."