Prayer is talking to God. Most of us function from the context that we pray and God will answer in some way or another and if the answer is not immediately perceivable to us we will try to function within God’s will. There is a therapeutic value in prayer just because one is praying. Firstly, it indicates that a person has a sense of hope in God, or what in fancier words might be called transcendent Hope; that is hope that there is something for them beyond their immediate situation. Having this sense not only furthers that important sense of life-meaning because their identity is not wholly defined by death, but affords peace because an individual knows something better awaits after the experience of physical death.
Secondly, there is nearly always some sort of experiential benefit to praying. For example, studies have shown that religious practices increase levels of serotonin and endorphins which encourage a sense of well-being and reduction of pain. Other benefits include enhanced cognitive abilities to plan into the future and formulate complex logic trains. These are therapeutic effects of the act of praying, whether or not a prayer intent is answered. For a good synopsis of current research see this article: occurshttps://www.medicalnewstoday.com/articles/322539.php
Thirdly, the method of prayer one uses has therapeutic benefits. There are different ways of praying are there not? Some pray extemporaneously with a soft voice others pray extemporaneously in a loud excited voice. Some pray in tongues while others pray in their native language. Some pray using already written prayer and some prefer not. Some prefer to pray corporately others quite alone. Some use beads others rocks. Some pray in a slow mediative way that harmonizes breathing to the prayer while others simply articulate words with their mind. There is imagery prayer, relaxation prayer, the use of symbols, the praying of holy words, and the utilization of sound. There are probably a whole lot more ways of praying as well.
From my twelve years working with the dying I can offer anecdotal testimony that the way of praying does indeed help. I have seen people relax and be less anxious by learning to pray the Jesus Prayer and have seen the same prayer help people with COPD to relax. I have taught the meditative use of the Lord’s Prayer and seen it transform people from a state of extreme anxiety to peace. I have seen times when the slow quiet almost breathless intonation of the Psalms of David helps those suffering Parkinson’s tremors, and have seen pain helped by the use of guided imagery. I’m sure other practitioners can tell you many other and perhaps better documented examples, but my point here is that the method of praying can does work to further comfort.
Exploring the benefits of prayer when it comes to the end of physical life is well-worth the effort. If you would like to read more about these things here please send note and I’ll be happy to expand my comments.