On the sides, do the middle first and then work out to one inch from the corners. You have several options for creating the corners.
For a rounded wood edge (pictured), pull the middle of the fabric and cut excess fabric. Pull hard at the middle of the corner first, and then continue to pull on the middle and staple until there are no rumples or fabric. Put the first staple on an angle toward the middle.
For a square corner, pull the side all the way over and staple. Gather fabric and cut the excess. Fold the fabric under and pull. The fold might take a couple of times to create; make sure it looks smooth from the front before you staple.
A double pleat is for 2-inch foam or when the fabric is stapled on the side of the wood of the chair instead of underneath. Pull the center first and staple. Take the excess on each side and fold the fabric toward the center and staple.