It sounds like you are having intrusive thoughts. This could be a sign of OCD/Scrupulosity. You may want to research the topic if you haven't already.
"Scrupulosity OCD is a common Obsessive-Compulsive Disorder (OCD) subtype in which a person experiences intrusive, unwanted thoughts, images, or urges about violating their religious, moral, or ethical beliefs. These obsessions cause the person significant distress, anxiety, and guilt, which they then try to relieve by engaging in compulsive behavior, like avoidance and excessive praying." -
Religious or Scrupulosity OCD: Symptoms and Treatment | NOCD (treatmyocd.com)
Excessive prayer would mean repeatedly praying because you don't feel "right" or forgiven yet. Maybe your mind keeps telling you that you didn't say the prayer right, so you have to pray again, and again, and again.