Lay out the foam batting flat on the work surface and place the artist's frame over the top. Artist's frames come with or without canvas, and are available at most art supply and craft stores. Artist frames come in a large variety of sizes. Choose frames that are roughly the width of the bed, and any height you want for your design. For single beds, look for one about around 39 inches wide, double beds will need 54 inches wide, queen beds need 60 inches, and a king-sized bed needs 76 inches wide.
Pull the edges of the batting over the sides of the frame, starting from the center of each side and stapling in place as you go. At the corners, using hospital corners to create neat 90-degree angles and staple in place. Trim off excess batting from the back.
Flatten out the chosen upholstery fabric wrong-side up on the work surface and place the frame on top with the batting down. If you have a fabric with a stripe or other design that should be straight, ensure the frame is laid so that the design will appear straight on the front.
Attach the fabric to the back of the frame as you did the batting, but check periodically that the design is still straight as you go. Trim off excess fabric from the back.
Cut a length of 1-by-2 lumber about 3 inches shorter than the top of the inside edge of the frame. This is the cleat, or hanging support for the headboard.
Draw a level line on the wall at the height you want the headboard to hang and use a stud finder to mark the position of the wall studs on the line.
Center the cleat over the level line, then secure it to the wall studs with 3-inch drywall screws driven through the front of the cleat into the wall.
Center the headboard over the cleat. The top side of the frame will hang on the cleat. Secure it there once happy with the position with screws driven through the top portion of the frame into the cleat top.