To make a platform for a twin bed, begin with 1-by-10-inch boards to make the bottom box and 1-by-4-inch boards in the bed dimensions placed on their sides in a rectangle for the platform. Finish the bottom box with 1-inch thick plywood to create a bed height of 20 inches when a 4-inch mattress is inserted.
Make the base box with head and foot lumber: Stand them on the sides to build the box, and attach the corners using L-brackets or corner blocks. Cut brace pieces using the same size lumber 1.5 inches shorter. Attach braces and L-brackets inside the platform with wood glue around the top of the bases and braces. Place a 3/8- to 3/4-inch plywood piece on the top of your base.
If you want to top the base, add up to 4 inches of width around the length and foot of the bed. Form a rectangle with the extra boards, and secure the pieces with L-brackets and slats. Lay the platform on the base before attaching the top, and ensure the braces all rest on the base. Use L-brackets and deck screws to secure each brace to the base. Glue the sides of the platform and the braces, and carefully place the top over the platform before screwing it into place with deck screws.
Sand all edges to smooth any roughness, and add wood glue to the screw holes. Sand the whole platform, and varnish, stain or paint it as desired. Add an upholstered or wooden headboard, if desired.