Measure the width of the bed frame and add 6 to 8 inches for clearance depending on how much of the headboard you want to see on either side of the bed. Measure from the molding on the wall upward to decide how tall you want the headboard to be.
Cut two 1-by-6 inch boards for backer boards to the measurement of the bed plus the extra for bedding clearance. Sand the two backer boards to remove any rough edges.
Cut the bottom of the cedar pickets to the desired height of the headboard; average would be about 4 feet. Sand the cut ends of the pickets to remove any splinters.
Place the pickets on the work surface with an index card turned long ways in between each picket as a spacer. This is to keep an even 3 inch space between each picket, be sure there is an index card towards the top and bottom of each picket.
Place an index card level with the bottom of each cedar picket. Use these as a guide to apply wood glue to each picket. Place one backer board along the pickets level with the tops of the index cards.
Hammer a finishing nail into each picket through the backer board.
Measure 6 inches from the top of the cedar fence pickets and place an index card on each picket. Repeat applying the wood glue, backer board and finishing nails as before. Allow the glue to dry as instructed on the package, at least four hours.
Paint or stain the headboard as desired and allow ample time to dry.
Place the headboard against the wall where it will be installed. Have a partner hold the fence as you walk down the wall with a stud finder. Make a small mark on the wall where the studs are located.
Screw the fence into place with wood screws at each dot.