King Tut reputedly invented the bed 13 centuries before Christ, but don't count on any special kind of bed to help you sleep. According to the booklet "The Sleep Disorders" published by the Upjohn Co., "well-constructed mattresses may be important for people with orthopedic problems; their effect seems irrelevant to sleep."

Chronic or occasional insomniacs may improve sleep by adhering to certain rules for "good sleep hygeine," evolved by sleep specialists over the past few years, and published in dozens of sleep books, brochures and pamphlets.

These include:

*Get up at the same time every day, even on weekends.

*Avoid caffeine in the evening.

*Avoid alcohol in the evening. It may help you get to sleep faster, but it disturbs sleep by fragmenting the stages or cycles of sleep.

*Avoid lying in bed frustrated and angry because you can't sleep. Get up and do something.

*Hunger can interfere with sleep. Try a glass of milk with a carbohydrate snack. A cookie is fine. Some specialists believe that the carbohydrate enhances the effect of the amino acid tryptophan (found in the milk) which has been shown to induce sleep in some studies.

*Avoid sleeping pills except on rare occasions as prescribed by a physician.Avoid smoking. It fragments sleep, interfering with the cycling of sleep stages It also affects breathing.

Some therapists are having success in using a behavioral technique called "sleep restriction" in treating resistant insomnias.

According to Dr. Wallace Mendelson of the National Institute of Mental Health, this requires a patient to keep accurate logs of how many hours are spent in bed and how many of those hours are in sleep. "If the person says he was in bed about eight hours, but only slept six hours, we tell him to spend only six hours in bed altogether.

"After a while, the body gets the message that if there is to be any sleep at all, it better be done within that six hours." Once the person actually sleeps that long, time in bed is gradualy build back up. "This is," he said, "a very exciting new treatment."

A broader program called "stimulus and control" is based on the theory that some sleeplessness occurs because the bedroom becomes associated with behaviors other than those normally associated with beds, [it] becomes associated with things that are actually incompatible with sleep. For example, says Mendelson, "like arguing with a spouse where the children won't hear, or paying bills, or watching TV."

The therapy involves stripping the bedroom of any association save sleep and lovemaking.

"Of course," Mendelson says, "one thing we are beginning to realize is that if you don't have any trouble sleeping, it doesn't matter what your sleep habits are. As long as you're happy, who cares?"