Measure the width of the headboard. Locate the exact center of the headboard, and draw a line from the top of the headboard down to the bottom. Measure 2 inches out on either side of the line, and mark it. Draw a straight line from the top to the bottom of the headboard at these marks to indicate where to cut.
Cut down the length of the cut lines using a jigsaw. Cut the strip you removed into three equal pieces. The exact length depends on the size of the headboard.
Lay the headboard flat on the ground, face-down. Bring the two cut edges together, lining them up. Place the three strips you cut in Step 2 across the seam where the two pieces of the headboard meet. Place the first strip 2 inches below the top edge. Place the second strip 2 inches above the bottom edge. And place the third halfway between the first and second strips. Align them across the width of the headboard, centered over the seam. Secure the strips in place by placing four nails into each strip; two nails on the left side of the seam and two nails on the right side of the seam.
Turn the headboard over. Cut a piece of 1-inch upholstery foam to the shape of the headboard, including any legs on it. Use a serrated knife to cut the foam. Spray the surface of the headboard with spray adhesive, and press the foam to it. Let the adhesive dry for 30 minutes. Use a utility knife or serrated knife to cut a hole in the foam over each hole for the bolts that attach to a metal bed frame bracket.
Cut a piece of fabric the size and shape of the headboard, plus extra to wrap around the sides of the headboard and to extend 2 inches over the back. Place the fabric face-down on the floor. Place the foam side of the headboard face-down on the fabric. Pull the fabric over the edge of the headboard, and secure it in place using a staple gun. Start by pulling the fabric in the center of the headboard on all four sides. Then, work on the legs and the rest of the headboard.
Cut an X in the fabric where the holes for the bed frame brackets go using a utility knife. Feed a bolt through each of the holes in a metal bed frame, through the fabric and foam and out the other side of the headboard. Secure the bolts in place with a nut.
Set your bed up as usual.