Measure the length and width of the patio with a tape measure. Cut two pieces of pressure-treated 2-by-4 lumber to the length of the patio, using a circular saw. Cut two pieces of 2-by-4 lumber to the width of the patio minus 4 inches.
Stand one of the width-length pieces at the end of one of the length-sized pieces with the 4 inch wide faces vertical, to form a 90 degree corner. Screw the pieces together using two 3-inch galvanized screws. Repeat with the other two pieces of 2-by-4.
Dig a 3 1/2-inch deep, 2-inch wide trench around the outside of the patio, using a spade or a trowel. If the patio paving has slipped out of place, lift the paving and re-lay it properly before starting to dig. Place the 90 degree corner pieces into the trench. Screw the two unsecured corners of the patio frame together with 3 inch long screws. Tap the frame down firmly into the ground with a hammer.