Measure the surface of your mattress. A normal twin bed measures 39 by 75 inches, while a double bed mattress is 54 by 75 inches. Divide each measurement, length and width, by 13. Round down if you end up with a fraction. For a twin bed mattress you will end up with 3 by 5 and the double bed measures out to 4 by 5. This is the number of milk crates you need.
Stand two milk crates up with the open ends facing up. Make the edges even with each other and push the crates up against each other. Zip tie the two crates together at two spots, fastening the ties through the crossed bars on the sides of the crates.
Tie another crate next to the first two, continuing the row. Add more crates until you have enough in line to complete the first row in your pattern.
Build more rows of milk crates until you have enough to complete the design. Place the rows next to each other and zip tie them through every crate. You will end up with a rectangle of open milk crates, all connected together.
Turn the crates over so that the open side is facing the floor. You will probably need a friend to help you turn over the crates. Center the mattress on top of the milk crate pedestal to complete the bed.