This is accomplished most often with some sort of knockdown hardware so the bed doesn't have to be moved in one piece. The last major component of a bed is something to support the mattress. Many beds have a box spring as well as a mattress. Box springs are designed as a semi-rigid support. They can absorb some of the impact of a person sitting, lying, or even jumping on a bed, which prolongs the life of the mattress.
Many people find the springy support of a box spring more comfortable than wooden mattress supports.
From a bed builder's viewpoint, it is easier to build a wooden frame bed for a box spring. While a simple mattress needs slats or a platform to support it, a box spring is supported around the edges. On all but a king-size bed, a simple wooden cleat or even a series of mattress hanger irons screwed in place around the inside of the bed rails is enough. For years, I just attached this center support with small angle brackets. This functioned well but had to be screwed into place when setting up the bed.