There is scientific evidence that affirmations (prayer if you so want) does have a positive effect on performance, as does visualization.
I am not religious, but when I do feel a need to express gratitude for my life, I do "thank" the universe in general and think about how lucky I am to have food for the day, a great family and a roof over my head.
Gratitude also has some scientific evidence in favour of it, and it does correlate with improved psychological health.