Researchers have found a key to when, how long and how well we sleep. What they have learned gives them the ability to cure jet lag, Monday morning blues, and a kind of insomnia that afflicts more than 3 million people, according to researchers at Stanford University and Montefiore Hospital in New York.

The new knowledge also leads the researchers to issue a warning to shift workers and their employers: dangerously low levels of job performance are inevitable if workers' sleep-wake schedules are not adjusted properly, said Dr. Charles Czeilser of Stanford.

The central new finding, published in Science magazine this week, is that sleeping and wakefulness are directly connected to variations in body temperature. Sleep patterns follow in step with the daily rise and fall of body temperature -- a cycle covering two degrees or so, from about 97 to 99 degrees.

The new facts about the way sleep works are contrary to long-held popular beliefs. The body is not like a battery that needs nightly recharging with sleep, researchers say. For example, someone who has not slept for a long time -- from one to 10 days -- need not sleep extra hours to recover: his normal sleep time will be sufficient.

On this regular temperature cycle, there is a normal "wake-up-time" and and optimal "go-to-sleep" time. When these natural body times are out of sync with the rest of the world, the results can be jet lag, Monday blues and insomnia.

"Our ability to go to sleep depends on when we try to do it," said Czeisler, "and if we go to sleep at the wrong time in our body's temperature cycle we won't be able to, or we will have inefficient, fitful sleep."

How long we sleep also varies according to when in our temperature cycle we go to sleep -- regardless of whether we have been deprived of sleep. Those who have gone without sleep for one to 10 days in laboratories generally have slept no more than eight to 15 hours afterward.

In fact, those those who slept longest -- from 12 to more than 20 hours -- were not sleep-deprived. They merely went to sleep shortly after the body's wake-up signal had passed, and slept through two whole cycles before getting another wake-up signal.

The normal "wake-up" time occurs when the body temperature is climbing from its daily low up to the daily high. About halfway through the rise, chemical and physiological triggers start the process of waking up. The normal time to go to sleep is when the body's temperature is dropping toward its daily low.

Getting these rhythms out of sync can in some cases be serious. Disjointed body cycles can cause everything from the blues and mild depression to full-blown psychoses and sickness, depending on how severely split the body cycles are.Both physical and mental performance can decline drastically.

The most serious consequences of misunderstanding and misusing the sleep cycles, Czeisler said, occur in shift work -- a category that includes dangerous jobs such as air traffic controller or pilot, nuclear and chemical plant operator, hazardous materials transport driver.

Czeisler and Dr. Elliot Weitzman at Montefiore have created out of this new knowledge a treatment for 10 to 15 percent of the 25 million insomniacs in the United States. Their problem, called sleep-onset insomnia, is that their bodies insist they get their sleep between about 4 a.m. and 11 a.m. These night owls are unaware of this natural rhythm, and spend their lives being analyzed by psychiatrists and taking pills in search of relief.

The doctors correct the problem by getting such patients to go to bed three hours later every day until they have wrapped all the way around and end up awakening early in the morning. The patients, once shifted, have been able to adjust and have continued to sleep normally since.

The body's regular temperature rhythm is changeable, and in fact is influenced by many outside factors. Among these are caffeine, large meals at the right time, and, of course, drugs.

Thus the treatment for jet lag, designed by Dr. Charles Ehret at Argonne National Laboratory for the U.S. Army, uses food and sleep patterns over several days before a long flight to adjust a person's body cycle to fit the time zone which he will be traveling.

Monday morning blues are the result of weekend fudging on normal sleep times, Czeisler said. Going to bed late on Friday and Saturday, then trying to fool the body by going to bed early on Sunday doesn't work. Sunday night's sleep will be poor, and Monday's mood crummy.