Work and prayer are not enough. While one's nose is to the grindstone, beavering away at whatever task, someone slightly wiser will notice some shortcut worth a year of diligent labor and prayer. The leisure time that shortcut buys will enable the identification of other valuable knowledge... It may be better yet to join such ingenuity with the labor you're talking about.
But ingenuity is part of work. Granted, knowing when to take a step back from brute force is a skill that must be developed and one at which some seem to have stronger natural aptitude than others.