One out of four Americans couldn't get to sleep last night.

They may have tried the traditional remedies -- counting sheep, drinking warm milk. But they probably ended up reaching for the medicine cabinet.

The more we've learned about modern sleep drugs, however, the more they've lost their innocence.

President Carter was concerned enough about the safety and usefulness of prescription sleeping pills that he asked the National Institute's report found it "difficult to justify" the prescribing of so much sleep medication in this country -- 25.6 million prescriptions in 1977 -- and urged physicians to prescribe "only very limited numbers of sleeping pills for use for a few nights at a time."

Beyond the risks of dependence, side effects, overdose (especially in combination with alcohol) and buildup of chemicals in your system, many, if not most, sleep drugs may actually rob you of the natural "dreaming" sleep you need to wake up refreshed.

Simply put by Dr. J. Christian Gillin, chief of the unit on sleep studies at the National Institute of Mental Health and steering committee member of the Institute study, "There is no free lunch."

The usefulness of non-prescription sleep aids also has come under scrutiny by sleep researchers. Though evidence is sketchy, authorities rate the effectiveness of those heavily advertised over-the-counter sleeping aids (which Americans buy at the rate of 80,000 packages a day) from moderate to abysmal.

Probably the most common of all self-prescribed sleeping aids, alcohol, may help bring drownsiness, but it also disrupts and shortens normal sleep.

"Alcohol always ends up being disastrous," warns Dr. Richard Allen, director of the sleep disorders clinic at Baltimore City Hospital. "Eventually it destroys sleep totally."

According to Dr. James C. Paupst, writing in "The Sleep Book," marijuana also can interfer with natural sleep.

So what can troubled sleepers -- including something like 50 million Americans -- do?

First, you should know that insomnia is not a disease, but a symptom. Sleep drugs only mask -- never cure -- the underlying causes of sleep troubles.

"Insomniacs come in many different flavors," says Dr. Wallace Mendelson of NIMH, a consultant to the Institute study and author of a forthcoming book on sleep medications.

Sleep troubles may result from the simple stresses of daytime living, illnesses like arthritis, depression (of which insomnia is often a key symptom), misuse of medications, alcohol, poor sleep habits and, in less common cases, from functional sleep disorders that only recently have been uncovered.

Behind the vast majority of sleeping problems, says NIMH's Dr. Gillin, lies one villain: temporary stress. Stress can be brought on by such day-to-day problems as "worrying about an exam, your income tax, a fight with your boss or your kids, or overwork."

Authorities agree on the importance of establishing a familiar and relaxing nightly ritual to help settle you down before sleep. Abe Lincoln went for midnight walks; Caruso the singer slept with 18 pillows; Charles Dickens always carried a compass so he could turn the head of his bed toward the North Pole.

Workers on irregular or unusual shifts may suffer "phase-lag" insomnia (a cousin of jet lag) when work hours conflict with the body's internal clock. Sleep therapists have recently reported success in "resetting" the body's clock for such sufferers.

Functional sleep disorders include sleep apnea -- marked by heavy snoring with frequent cessations of breathing -- nocturnal myoclonus, a repeated jerking of the legs during sleep. Both conditions cause unconscious arousals during the night (as many as 400) that take their toll during waking hours.

Finally, prescription sleep drugs themselves can cause insomnia when your body develops a tolerance to their effects. A vicious cycle can then set in -- you can't sleep without the drugs, but you can't sleep with them either. (And the risk of overdose increases.)

The more serious sleep problems associated with drugs, alcohol, medical, psychiatric and functional disorders require the attention of specialists. But for the typical intermittent insomniac, sleep experts offer some simple suggestions -- and validate some old ones -- for helping you fall asleep.

According to two Harward psychologists, there's reason to believe that counting sheep may indeed distract you from your problems and let you fall asleep. Imagining the woolly beasts occupies the functions of one half of your brain, they say, while counting them occupies the other.

It looks like there's something to the old warm-milk remedy, too. Researchers in Catonsville, Md., a few years ago found that milk (and leafy vegetables and meats) contain a natural amino acid called l-tryptophan that helps many people fall asleep faster and sleep longer. It is available in concentrated form in some health-food stores and appears to be "relatively benign," according to Dr. Mendelson of NIMH, though its side effects and long-term usefulness have yet to be thoroughly studied.

But the main advice from the experts for people who suffer an occasional restless night is not to worry about it.

"Insomnia may be healthy -- a natural response to stress, perfectly normal," says Baltimore's Dr. Allen.

Many people worry needlessly. Not everyone needs 8 hours of sleep each night. (One woman in a sleep study averaged only 52 minutes a night with no complaints.) As you grow older, your sleep patterns tend naturally to become shorter and more fragmented. And it's easy to exaggerate a sleeping problem since you have no sense of time when you sleep.

How do you know if you really have a problem? What counts most, says Dr. Allen, is not how much you sleep but how you feel when you're awake.

"The measure of a sleeping problem is the effect it has on your thinking and alertness the next day," he says.

If sleep problems persist for two weeks or more, you should see a doctor, but intermittent sleeping problems usually pass. When your body really needs sleep, you'll get it.

Sleeplessness, in other words, may be one nuisance of modern life that will go away if we ignore it. CAPTION: Illustration, by Ed Fisher; Copyright (c) 1979 The New Yorker Magazine, Inc.