Measure the width of the bed, and cut the headboard to size. Use 1¼-inch MDF screws to attach it to the carcasses and the 2x4 support frame. Don't use glue if you ever plan to move the bed.