Place a sheet of foam on the work surface.
Place the headboard face down on the foam sheet. Trace around the headboard leaving about ½ inch extra all the way around.
Cut the foam with a utility knife along the traced line. Make short shallow cuts in the foam until you cut through the entire thickness of the foam.
Spray the front side of the headboard with spray adhesive and press the foam onto the headboard.
Place the fabric wrong side up on the work surface and cut around the headboard so there are 4 inches of fabric around each of the edges of the headboard.
Pull the center of the bottom edge of the fabric around the headboard and against the back side. Secure with a staple. Move to the top edge and repeat. Secure both the left and right sides with one staple in the center of the fabric.
Secure the rest of the fabric to the backside of the headboard with staples spaced every 2 inches. Start at the center staple in each side and work your way out to the corners.
Fold the fabric at the corners like you are wrapping a present. For example, for the bottom right corner of the headboard, pull the corner point straight down and tuck the fabric flat against the headboard. Secure with a staple. Then, bring the corner point straight upwards and secure with a second staple. Repeat for each corner.