If a person has a type of anxiety that can be fixed by prayer and other overtly spiritual activities, they probably don’t have a very clinically significant anxiety at all.
Most of the time, the spiritual activities people with clinically significant anxiety do to deal with their anxiety stem from the anxiety itself. They are forms of self-medication, actual functions of the illness. They are not so much “choosing” to do these things, but driven to them by the lack of other, more effective, options. Once people get the treatment they need (therapy, medication, often both is most effective), they can then make choices to do their spiritual activities rather than those activities coming out of the anxiety to begin with.