Order the wood to be cut to the bed size specifications at the home improvement store. Ask for two of the 2-by-8s to be cut to 40 inches; two more cut to 79 inches; and one cut to 38 inches. These will form the head end, foot end, sides and center support for the platform. Ask for the MDF to be cut to 40-by-81 inches.
Set the 2-by-8 pieces out to form the rough outline of the platform box. Attach one of the 40-inch pieces to the end of a 79-inch piece, with the shorter piece on the outside. Drill in two drywall screws to secure them at a right angle. Continue building the box by drilling in drywall screws to create a rectangle that is 40 inches by 81 inches. Verify the size with a tape measure.
Place the center piece in the center of the box frame so that the ends touch each long piece of wood. From the outside, insert two drywall screws through the long piece and into the center piece to secure it. Repeat on the other side. The box frame will now look like a blocky number "8."
Lay the MDF on the ground, and set the box frame on top. Align it so the corners of the box frame match up with the MDF corners. Place an angle bracket close to one corner, and drive wood screws into the 2-by-8s as well as the MDF. The angle brackets will keep the MDF securely attached to the box frame. Repeat in each corner of the bed frame. Place two angle brackets on each long side for added stability -- one on each side of the cross bar.
Turn the bed frame over so the MDF side is up. Drive more drywall screws from the top down into the end pieces and the cross piece to secure and stabilize the bed frame.
Paint the bed frame in the color you desire and let it dry for at least 24 hours.
Drill bolt holes through the legs of the headboard -- two bolt holes on each side of the headboard. Hold the headboard up against one long side of the platform and mark the bolt holes with a pencil. Drill bolt holes in the bed frame.
Align the headboard bolt holes with the platform bolt holes and insert carriage bolts. Tip the bed frame slightly to access underneath it to screw on the nuts.
Move the daybed frame in place and set a twin-sized mattress on top. Add bedding and set four large decorative pillows against the headboard. Place smaller pillows along the front of the large pillows to create an inviting daybed made from an old king-sized headboard.