Once you pass the 25 wave mark you'll start to notice that flying enemies are getting much stronger, so farmer spam slows down. Continue to spam farmers and upgrade your bow. You may find it useful to upgrade your village bowmen to help with the flying enemies. In addition, you should be using lethargy to help slow the tide of enemies.
Sometimes you'll find it useful to use lethargy and then immediately run past the enemies to kill bowmen, healers, and other special units that hide behind the main force. This can drastically weaken their attack.
Once you reach wave 40, you should immediately begin to use and upgrade the troop trample skill. This skill will lead you through the rest of the game as long as you have upgraded your farmers and bow.
In the end, you'll be spamming farmers constantly while you use lethargy and troop trample as applicable.
For the final wave (50), you'll want to stay far back from the shogun boss. He can kill you in a single hit and has a tremendous amount of range. Don't worry if he reaches your bowmen, he is very slow and the constant stream of farmers will almost keep him in place.