That's known as Pascal's Wager. Somehow I have a hard time believing he said that in seriousness. What kind of all-knowing God wouldn't see through such behavior?
Incidentally, I just did a search for Pascal's Wager, and found a site with some articles discussing Pascal's Wager. It may be found here.. I don't know the mission of that web site, but it was the first page I looked at through Google search. I might go read some of it myself.
There is some logic, though. By behaving as though there was a God, you'd see the rewards of Godly living, and understand actions have consequences. In Godly living, the consequences are good.
By not living in a Godly manner, you'll live to see the chaos and misery. It's enough to lead one to God.
Example - anti-God left wing policies have lead to disease, poverty, dependancy, misery , dispare, and death.
Pro-God policies on the right have lead to health, wealth, freedom, happiness, and life.