The first problem was that the headboard needed to be raised about 6". So I took some of the bedrail and made a 6" extension. I trim it out in the finished product.
Next, I had to build the frame for the bench. The headboard had that "inset", and I wanted the bench to go the full width of the headboard all the way to the outside edge, so I had to account for that. As you can see, I put one 2x4 the same width as the inset and used pocket screws to secure it to the headboard. Then I built a rectangle frame that wrapped around the sides of the headboard and used pocket screws to secure the frame to the other 2x4. You'll notice that the rectangular frame doesn't quite go all the way to the outside edge. That is because, I have 1" trim pieces that I made from the old bed rails that I will fasten to the frame toward the end that will make the bench flush with the outside edge.
Next was pretty easy. Just filled in the bench with 2x4's and pocket screwed them into the frame, and built the legs with 2x4's to match the height of the back legs. I then added some braces as you can see to just tighten it up a little more. What you cant see is that I also added a 2x4 underneath the bottom of the bench in the middle to give the bench more support.
Add, here you have it. I painted the new wood pieces all black and trimmed the outside edges with the old bed rails. I put a nice wax shine on all the wood to make it look like a brand new bench.
1 old headboard and old bed rails
10 - 8 ft 2x4's
1 - Can of black glossy spray paint
Nails and screws
Couple pieces of scrap trim for the leg extensions on the back.