IT IS PURELY logical. If you've an urgent need for a bed and a desk but room for just one, you had better sleep on the desk.

Two years ago, Rick Miller's brother Nat found himself facing a similar spatial dilemma, and he asked Rick - then a carpenter working on Metro subway construction in Arlington - to build him a loft bed. Rick built a basic wooden frame, sort of a decorative version of the concrete-form frames he'd been building on the Metro job, topped it with a mattress, and went back to work on the subway.

Later, he got a call from Nat's friend, who wanted Rick to build him the same bed. Rick built the bed, and again went back to work on the subway.

It was only a matter of time before Rick Miller realized he could stop going back to work on the subway.

After a trip to New York, where he talked to the people at Loft Craft and was allowed to take some photographs (but no plans), Miller rented the basement of an Alexandria townhouse, set up a couple of cramped work areas and put out a sign that said "The Loft Bed Store."

He figured he would sell loft beds and platform beds (also called storage beds because of the recessed box-like storage area under the mattress platform). And he figured customers would show up because the fast-rising cost of horizontal living space in and around the Federal City made it increasingly sensible to buy a bed with more than one story: one being a bed, the other a dresser or desk, closet, sofa, another bed, a table, or a combination thereof. Miller would not be difficult to get along with - the lofts would be custom-built to include whatever the customer wanted under his bed, within reason.

He figured reasonably well. He has since moved from the basement to a storefront showroom around the corner at 915 King St., taken on a partner, rented a shop in an industrial park in Lorton and hired five carpenters who work there. His platform beds, built of solid oak or birch (as are the lofts) and starting at $210 for a twin-size, sell better than the loft beds. After a trip to the showroom, however, it is the lofts (which start at $425 for a twin) that stick in the mind.

"I have this small efficiency," Chuck Livengood was saying recently, "and I didn't want to get a sofabed, because I didn't want to have to fold it out every night and put it back together every morning."

A friend suggested The Loft Bed Store to Livengood, a 28-year-old GSA computer programmer who lives in a 17th Street NW apartment building downtown. Livengood did just that, and wound up buying the first loft Miller ever sold with a sofa underneath. Above it's a double bed, with a built-in platform for an alarm clock or whatever, below is a 34-inch wide sofa, with a built-in end table.

And ever since Livengood took delivery in January of 1977, most of the visitors who sit on his sofa have absolutely no idea whether he's made his bed or not.

The first thing one runs into upon entering The Loft Bed Store (if one is not careful) is the desk at which most business is conducted by Miller, his 28-year-old partner Greg Gloor and Gloor's wife, Lois - all of whom take turns minding the place.

Above the desk, and supported by the same four L-shaped posts, is a double bed. This is known as marketing strategy.

The store is in an older building, which thus sports higher-than-average ceilings, the ideal loft bed setting. This particular loft-desk model happens to be high enough to enable Miller to stand up to his full 5-feet-11 inches beneath the bed without hurting either himself or the furniture. He is standing there now, explaining through his large, droopy mustache how there are no screws or nails used, how the entire bed is held together with carriage bolts and wooden dowels and can be unbolted and disassembled if need be, and how the height of the bed can be altered to suit the customer's ceilings.

The beds, Miller says, are treated with linseed oil and finished with wax, and buyers are encouraged to keep the wax fairly current. The finish looks and feels like varnish or lacquer. The lofts seem solidly built: Although they're all free-standing, normal shoving cannot produce a wobble. The beds are delivered in pieces, and are bolted together at the customer's home upon arrival.

Allen and Phyllis Holt were very happy with the Ontario Road cooperative they moved into a while back (and have been renovating since), but there was this one problem. While their 16-year-old son Greg and a rather nice-size bedroom, that of 13-year-old Brett was tiny - about 8 by 10 feet, to be specific. Within a twin bed and a dresser in the room, human passage called for a shoehorn.

"I was going to try to build a loft in here myself," said Holt, a biochemist with the National Science Foundation. "But it would've been a couple of years until we got around to it."

Holt had a friend who had a brochure from The Loft Bed Store. One thing led to another, and now Brett has a twin bed, a desk and a dresser all in one, with room left over for a small bookcase, his model rockets and a parakeet named Fydrich.

"This is pretty much the same design we had in mind," said Phyllis Holt, a sixth-grade teacher in Montgomery County. She pointed to the desk below, which extends about two-thirds the length of the bed and abuts a four-drawer dresser at one end. A bookcase above the desk extends the full length of the bed, and Miller altered the slant of the ladder to avoid a conflict with the floor radiator nearby.

There's a three-foot clearance above, thanks to the high ceilings that came with the old brick structure (which the Holts believe was built about 1910 by a group of physicians who used it as a professional building), and Brett can sit up in the bed with no trouble.

Miller says he sells about one loft bed a week, and most are pre-designed models - with a desk underneath, a desk and a dresser, various shelving units, a second bed, etc. - that come in standard sizes with a choice of mattress firmness.Miller says he is open to novel ideas, however, and has already sold one unit with a full closet underneath, and one custom-built king-size model that cost about $1,000.

While The Loft Bed Store is one of few shops south of New York City that specialize in such high-rise furniture, Miller says he found it economically sensible to sell platform beds as well. A platform bed owner, however, cannot count on using the underside of his bed for studying or shelving books or entertaining guests. Beneath the solid-slab mattress platform which gives the bed its name is a recessed box-like storage area, usually containing several drawers that roll out on casters. The beds are sold by an increasing number of area furniture dealers - American-Wood Stacks in Vienna, Woodstock Contemporary Furniture in Rockville, and Scan in various locations, to name a few - and are naturally less costly than their two-story relatives.