Set your mattress on the floor.
Cut four 2-by-12 boards to form a box around the mattress, two for the sides and two for the ends.
Loosely assemble this box around the mattress. The mattress should fit snugly within the box.
Drill three 1/16-inch pilot holes in each corner, then screw the boards together with a 3-inch wood screw in each pilot hole.
Remove the mattress from the box and set it aside.
Cut four pieces of 2-by-4 board. Each should be 6 inches shorter than one inside edge of the box.
Measure up 5 inches from the bottom edge of the box. Mark this height around the box interior with a pencil, using a yardstick to keep your lines straight.
Attach a cut 2-by-4 board onto each interior wall of the box with 3-inch wood screws, using the pencil marks to line up the upper edges of the boards. The screws should be inserted every 6 inches.
Cut pieces of 1-by-4 board to stretch the horizontal gap across the box. Place them onto the 2-by-4 boards with 4 inches of space between them, and nail them in place with 2-inch finishing nails.
Flip the loft frame over so the bottom is facing up.
Cut four 4-by-4 posts to a length that will elevate the bed frame to the desired height.
Stand one 4-by-4 post at each corner of the frame.
Drill two holes through each post and the bed frame behind it. The holes should be wide enough to fit the carriage bolts through.
Thread a washer onto a 6-inch carriage bolt, then thread the bolt through two of the aligning holes. Thread another washer onto it, then tightly screw a nut onto the end. Repeat this process for the remaining 7 holes.
Cut three 2-by-4 boards. Two should be the same length as the loft's end boards and the third as long as the back board.
Screw these three 2-by-4 boards to the inner edges of the posts at the sides and back of the loft, positioned halfway up the posts. They will provide stabilization to the loft. Use two 3-inch wood screws per connection, drilling pilot holes before screwing.
Flip the loft right-side up. Paint or stain it if desired, or leave the natural wood finish.