Cut your lumber to the appropriate dimensions for your mattress size.
Sand all faces of the lumber with coarse grit sandpaper. You don't have to get polished smooth. You're just looking to avoid splinters.
Using a drill bit 1/8" narrower than the diameter of your 2-inch wood screws, drill three holes in a line across the 12-inch face of one long plank. Drill the holes 1/2 inch from the end of the board and 3, 6 and 9 inches from one edge.
Drill a similar line of holes on the other end of the plank, 1/2 inch from that end. Drill two more lines of holes, evenly spaced between the end holes.
Repeat step four for the other plank.
Drill a line of holes 1/2 inch deep in both ends of each short plank. The holes should be 3, 6 and 9 inches from one edge, corresponding to the holes in the faces of the long planks.
Position all four beams in a rectangle, with the shorter beams inside the longer beams. The beams should lie on their narrow side.
Attach the rectangular frame with two 3-inch wood screws per point of connection.
Lay the plywood sheet on top of the rectangular frame, with all edges flush.
Attach the sheet with one 3-inch wood screw per corner. For larger bed sizes, put an additional 3-inch wood screw in the center of each side.
Attach one short plank and one long plank in an "L" shape by connecting them with 2-inch wood screws driven through your pre-drilled holes.
Attach the second long plank to the short plank in the "L" with three more 2-inch wood screws, forming a "U" shape.
Complete the rectangle by screwing a second short plank into position on the open side using six 2-inch wood screws.
Insert and screw in place the remaining two short planks. The end result should resemble a book case lying on its back.
Slide the support frame into position where you intend to keep your bed. Leave some clearance from the walls for now.
Set the mattress frame on top of the support frame, beam side down. It should fit snugly. If you have trouble, soap the outer face of the top 3 inches of your support frame.
Screw the mattress frame in place using 3-inch wood screws driven through the beam and into the support frame behind. Use one screw per two horizontal feet of board, evenly spaced.