The exact language is that of Patrick Overton, a motivational speaker of the 1940s, but he borrowed the concept which is much older and was in common parlance among advice peddlers of those days.
The idea originates with pastors and evangelists who commonly included such sayings in their sermons. The inspiration for the concept is Jeremiah 4:14 where it says, "Watch your thoughts, for sin begins with thought, and how long will vain thoughts be with you?"
Just to show how old this idea is, I will quote Bartholomew Ashwood (1622-1680):
Christians, make conscience of your thoughts; they must come to
judgment; watch your hearts from whence they come, and watch your
thoughts whither they go... etc.
You can find "Watch Your Thoughts" poems and mottoes throughout newspapers, magazines, sermon books and other places going back hundreds of years.