Measure how tall you want the finished headboard to be. Measure and cut 2-by-4-inch boards to the finished headboard's length, and set aside.
Measure the space between the floor and the bottom of your current bed frame. Subtract this measurement from the finished height you determined in step 1. This will tell you how tall the plywood sheet that you use as the base for the headboard needs to be.
Measure the bed’s width, and add at least 2 inches so that the headboard fully covers the head of the bed. Measure and mark the plywood sheet's height from step 2. Draw a curve or inverted “V” shape at what will be the top of your headboard. Alternatively, just make a straight line. Cut out the plywood along your drawn line, using a jigsaw.
Measure and cut a piece of foam the same size as your plywood, plus 2 inches in length and width. Measure and cut a piece of fabric to the size of your plywood, plus 8 inches in length and width.
Spread the fabric on the floor, with the front of the fabric facing down. Center the foam over the fabric so that 3 inches of fabric sticks out on all four sides. Center the plywood over the foam. Apply an all-purpose adhesive between the plywood and foam, if desired.
Wrap the fabric around to the back of the plywood at the top. Secure the fabric with a staple every 2 inches. Wrap the bottom fabric edge to the back and secure. Wrap the sides and staple, leaving the corners unattached.
Pull each corner of the fabric upward, and then fold it over toward the center of the headboard. Make sure the corners aren't creased in the front and are as smooth as possible. Staple the corners to the board once they're smooth.
Measure the distance from the center of the bed frame to the side rails. Find the center along the bottom of your plywood and measure out this same distance to the left and the right. Mark these points.
Lay your 2-by-4-inch boards vertically over the plywood at each marked side. Bring the upper edge of each board flush with the upper edge of the plywood at the top of the headboard. Secure the boards to the plywood with wood screws spaced every 10 to 12 inches. Stand the headboard up, and slip it behind the bed.
Align the side rails with the 2-by-4-inch boards, which act as the legs of the headboard. Locate the pre-drilled holes in the bed frame as it came from the manufacturer, and see where they align with the headboard. Insert a screw through each hole and into the 2-by-4-inch boards behind the frame.