Wesley addresses the common spiritual trouble of distracted prayer — the wandering thoughts that creep in even during the holiest exercises. He distinguishes which are sinful, which are not, and how to deal with both.
Sermon 41 of 44 · 1762 · 2 Corinthians 10:5
Wandering Thoughts
A passage from the sermon
Wandering thoughts, of what kind soever, are temptations; and they are not, in their own nature, sinful. They become sinful when, being given a place in the heart, they are entertained and indulged.
Let the man whose mind has been wandering in prayer not be cast down. The wandering itself was no sin; the recovery of attention is the work of grace. Be patient with thyself, return again to God, and continue in prayer; for the Lord is patient with all his children, and his mercy endureth for ever.
The full sermon is in the public domain and freely available from CCEL and other archives.