If you don't curl up in a hammock or hang from a tree branch at night, you probably catch your 40 winks in a bed. In various cultures, that could be a mat on the floor, a pile of skins or a roll-out futon. But in much of the Western world, you're getting horizontal in a bed, which comprises several key parts that you can rearrange to suit your style -- or just to get a good night's sleep.

The Frame

A typical bed frame includes the legs, perimeter rails that keep the mattress in place, and cross rails -- optional -- that support the mattress from below. Cross rails sometimes slide or adjust for better support of the mattress; they are usually slats, either metal or wood, to match the bed frame. A platform bed has no cross rails -- it's just a slab of wood or a flat surface on which the mattress rests. The perimeter rails connect the four legs and may or may not be connected to a headboard and foot board. Feet may be height-adjustable or have locking casters that allow the bed to be moved easily. Most bed frames are made from metal or wood.

The Fancy Parts

The headboard and foot board are always decorative and set the style of the bed, but they have functions as well. The headboard protects the wall from dirt and abrasion and provides a backing for the pillows you prop behind you to read in bed. Some headboards have built-in bookcases, shelves, lighting or cubbies for extra storage. Foot boards keep the cover from sliding off the bottom of the bed and may contain a shelf or cupboard unit to hide spare bedding. A canopy bed has two or more posters, normally one in each corner of the bed, to support a decorative canopy over the bed. Posters may also connect with an overhead frame for hanging bed curtains. Platform beds can be built over drawers or storage cupboards as a single sleep-storage unit.

The Mattress

Mattresses are a Ph.D.-worthy subject, with endless variations in size, style, springs and stuffing. The Better Sleep Council lists the following types of mattresses available for twin, super-twin, full, queen- and king-size beds: innerspring, foam, pillow-top, memory foam, latex, gel, airbed, waterbed, and hybrids. Mattresses cater to those with allergies, extra support needs, and varied budgets. Box springs are the foundation pieces that sit right under the mattress and prevent it from sagging or prematurely wearing out. Platforms perform this function and eliminate the need for a box spring. Airbed mattresses need a pump for inflation and deflation. Waterbed frames are usually padded to contain and protect the water-filled envelope so it won't puncture. Test-drive a new mattress by taking off your shoes and trying out different models in a variety of positions. You keep a mattress for seven to 10 years, so don't be shy about finding the perfect fit.