One popular misconception about Murphy beds is that the bed is recessed into an actual wall. In reality, although it is possible to situate a Murphy bed inside a wall, most are mattresses that have been placed inside some kind of cabinet when not in use, since the beds are usually at least 18 inches thick, whereas most walls are only about 5 inches thick.
A Murphy works by being pulled out of the cabinet before being replaced back inside. This means that the legs of the bed must be able to retract flat against the mattress in order to fit. The way this works is similar to the way that the legs of a sofa bed fold in order to fit inside the couch. In addition, a latch is necessary to maintain the bed's position within the cabinet.
The unique thing about a Murphy bed is that lifting it back into position is even easier than shoving a sofa bed back into place. A Murphy bed cabinet can be built to hold any size mattress. The amazing thing is that a king sized mattress is just as easy to push up as a twin bed. The reason is that the frames of a Murphy bed are counterbalanced and a piston system is used to support the action of pushing the bed up or pulling it down. If you notice you are having more difficulty raising and lowering the mattress, it may be a sign that the pistons have come out of place.