MineralMan has a point, AU. And besides, the lack of atheists in foxholes wouldn't prove God's existence even if it were true. It owuld only prove something about atheists and foxholes.
The problem with the atheists in foxholes theory is that it can be disproven with a single example. I will give you one. My father was a B-17 pilot in WWII. He was, and is, an atheist. His plane was hit by a burst of flak. It lost an engine, and was on fire. My father took shrapnel in his thigh. His copilot sufferd a head injury and was unconscious.
By sheer dint of will and the amazing fortitude of the B-17, he got that plane back to its base in Italy and landed it. All crew members survived.
I once asked him if he had called on God. He just laughed and said, "What God?" I was the one flying the plane, not some invisible God."
There is the example that disproves the cliche. There are many, many more such examples. It's just one of those things that people like to say, while having no idea whether it is true or not.