Spread the fabric on a flat surface with the wrong side face-up. Place the quilting batting on top of it. Smooth the fabric and batting completely so there are no wrinkles or bumps.
Place the cut-to-size foam on top of the fabric and batting. Center the foam above the materials.
Set the plywood headboard frame on top of the foam. Line up the edges of the plywood with the foam.
Fold the four sides of the fabric and batting over the back of the plywood as if you were wrapping a present to get the corners nice and even. Pull the fabric and batting as taut as possible.
Use a staple gun in the center of the top side of the plywood to attach the batting and fabric to the wood. Staple in the center of the bottom side then in the center of the left and right sides. Pull the fabric very tight as you staple. Continue stapling around the four sides, alternating from top to bottom and left to right until the fabric is completely attached to the plywood.
Cut away any extra fabric and batting from the backside of the headboard. Leave about an inch of fabric sticking out past the staples.
Attach half of a flush mount bracket in each upper corner of the back of the headboard with screws and a drill. Attach the other half of the brackets to the wall behind the bed, 24 inches above the top of the mattress. Use a level and measuring tape to make sure the brackets on the wall are even.
Slide the flush mount brackets on the back of the headboard into the brackets on the wall to hang the headboard in place.