MidCenturyModern.net shows how to do it. Here's an excerpt from the tutorial:
For the body, I would use some 2x6s and 2x4s (for the support frame), oak boards (for the top frame), and 1x4s (for slats). The headboard would be cut from a 4×8 furniture grade oak plywood sheet. I could then use the rest to build two nightstands. For legs, I would use four 8” stainless steel hairpin legs and four wooden legs. Four wooden legs would be attached inner part of the bed where you could not see.
The whole thing only cost about $350! Read more about the project here.