I do science and mathematics, and I am 'religious' - I believe in God, which I define simply as the universal consciousness - in other words, I believe the universe has a soul.
Much as how Erdos talked about 'proofs from the book', I believe that mathematical and scientific truths exist 'in the mind of God', ie, the universal consciousness, which, by definition, is aware of everything, already knows the truth that we seek, and the process of mathematical and scientific discovery is therefore simply a process of learning more about God. The flow state that one enters into when working is, in my mind, a sort of communion with the divine, which leads to the creation of great work.
This is similar, in my mind, to Michelangelo's quote about "seeing David in the marble and setting him free" - the statue already existed in the universal consciousness, and this consciousness guided Michelangelo into bringing it into being.
The proof of $THEOREM exists, your job is to find it, and the universe will gently nudge you in the right direction.
But obviously, that's just my opinion/point of view.
You could just as easily believe that the universe is not conscious, and truth is discovered simply by a combination of luck and effort, and that would probably work just as well ^^