SCIENTISTS studying the sleeping brain are making new progress in understanding the nerve cells and messenger chemicals that paint the mysterious mental images known as dreams.

The purpose of dreams remains as elusive as ever. Some scientists believe they help consolidate the memories and learning that took place the previous day. Others see dreams as a mechanism for allowing busy brain cells to recharge their depleted stocks of transmitter chemicals. There is no physiological support so far, however, for Freud's view of dreams as repressed wishes, and psychoanalysts are for the most part busy trying to cut and trim their guru's theory to the framework of modern findings.

It has long been known that sleep is governed by the balance between two opposed brain circuits, one of which produces transmitter chemicals that promote sleep, and the other chemicals that inhibit it. The circuits are locked in continuous see-saw tussle with one another. Depending on which has gained the upper hand, the brain is switched from sleep to wakefulness and back again.

Sleep is marked by about four periods a night when the sleeper's eyes move rapidly under the lids. It is during these periods, known as rapid eye movement, or REM sleep, that dreams occur.

REM sleep is brought on by waves of nervous activity that begin in the brainstem, the top of the spinal cord where it juts into the brain, and travel up to the geniculate nucleus, a region of the higher brain where visual input from the eyes is processed.

Since these sleep-inducing waves thus activate the visual-processing parts of the brain, it is not so surprising that dreams are primarily visual in nature. The first stream of brainstem waves usually begins about 90 minutes after the onset of sleep, and the fourth or last about 30 minutes before waking up. During each of these REM periods the brain is even more active than it is while awake. But because the muscles are paralyzed, the body lies quietly in bed.

The new research is focused on mapping the two opposing circuits and the transmitter chemicals they produce, as well as related circuits. Among the new findings are these:

*Researchers have discovered that the transmitters in the sleep-inhibiting circuit arise from two particular clumps of cells in the brainstem, called the dorsal raphe and locus coeruleus. A major function of REM sleep may be to let these cells rest and replenish their chemical stores during the night, some researchers say.

*The sleep-promoting transmitters, which are produced in particular profusion during REM sleep, are generated in two nearby clumps of cells. Dr. J. Allan Hobson, a Harvard Medical School psychiatrist and leader in the new dream research, calls these groups of cells REM-on areas. If a transmitter of the sleep-promoting type of transmitter is injected into these areas, there are temporary signs of REM sleep in the animal, notes Dr. Mircea Steriade, a sleep researcher at the Laval School of Medicine in Ontario, Canada. Although these areas probably contain other cell types, he said, their sleep-promoting type cells connect only to the thalamus, above the brain stem, where they help transmit the brainstem waves that bring on REM sleep.

*In an article to be published soon in The Proceedings of the National Academy of Sciences, Dr. Peter Reiner at the University of British Columbia in Vancouver has shown for the first time that some sleep-inhibiting neurons that govern waking are connected to the sleep-promoting neurons of dreaming, suggesting that each can influence the workings of the other. The connection is the first known physical link between cells involved in waking and dreaming.

*Dr. Hobson's group recently discovered another spot that can influence REM sleep for days at a time. When this area, in the parabrachial region of the brainstem, is stimulated by the sleep-promoting class of transmitter chemicals, he said, periods of REM sleep lengthen dramatically. He said this new-found area may be more important than the REM-on areas for the long-term regulation of REM sleep.

*Another nerve cell circuit connects to the place in the brainstem where movements like walking and running are triggered, Dr. Steriade said. When a group of cells in this region are activated by an as-yet-undetermined chemical signal, he said, the stimulation helps to bring on the muscle paralysis typical of REM sleep. At the same time, glutamate, a brain chemical that excites neurons, is active. This might explain a paradox of REM sleep, Dr. Steriade said, that the eyeballs move and the body twitches even though the dreamer cannot move his sleeping body. Secrets of REM

These findings offer important, though fragmentary, data from which researchers hope to understand the role of REM sleep. For the present, however, there is little but guesswork to fill in the many blanks.

"There are many theories but little data," said Dr. Robert McCarley, a psychiatrist at the Brockton Veterans Affairs Medical Center and Harvard Medical School. "Everybody loves to speculate."

REM sleep, which may have many purposes, does not seem to be a special attribute of the higher intellectual functions, since two species that get the most REM sleep, the opossum and ferret, are not noted for their mental acuity, said Dr. Jerome Siegal, a psychiatrist at the Sepulveda Veterans Affairs Medical Center and the University of California at Los Angeles. It must play a role in basic biology, he said.

Since fetuses and babies engage in huge amount of REM sleep, REM may be important for brain development before and after birth, Dr. McCarley said. In adulthood, it may serve to maintain neurons, giving them needed exercise, he suggests.

When rats are deprived of REM sleep for 10 days, they begin to eat voraciously yet die of starvation, Dr. Hobson said. It seems that REM sleep is crucial to brain metabolism and temperature regulation.

Although some scientists had theorized that dreams were the brain's way of disposing with unnecessary memories, the idea that REM sleep and dreams help consolidate memory is gaining ground today.

In this model, dreams are what happens when some memories acquired during the day are saved and some are jettisoned. Memories to be saved are removed from short-term memory banks, broken into fragments and stored in long-term memory circuits. When one of the circuits is stimulated in REM sleep, the entire memory, and related memories, can flood into dreams. Tool for Survival

Lower animals may dream to help reinforce nerve circuits created during experiences critical to survival, said Dr. Jonathan Winson, a sleep expert at Rockefeller University in New York. The process helps animals learn and remember skills they need to survive.

Like lower animals, he said, humans presumably dream to consolidate information with survival value. In this theory, information stored in childhood, when the process is most intense, would become burned into the brain's memory circuits and form the recurring background for dreams of adulthood, he said.

This view of REM sleep makes a lot of sense to psychoanalysts, said Dr. Morton Reiser, a Freudian psychoanalyst and professor of psychiatry at Yale University. Dr. Reiser is the author of a new book, "Memory and Mind and Brain: What Dream Imagery Reveals" (Basic Books). While the brain is activated in REM sleep, he said, neural circuits that had been active during the day would be aroused, along with related circuits, including those for unresolved problems, worries or emotional issues.

"What catches the dreamer's attention is what's on their mind," he said. "This theory would say that images in a dream carry meaning related to current life problems and to problems not solved before."

Few people today support classical Freudian dream theory, said Dr. Mardi Horowitz, a psychiatrist at the University of California at San Francisco. Analysts are reassessing dreams in light of the new findings, he said, and the work is creating new interest in psychoanalysis.

The idea that unfinished emotional business is the stuff that dreams are made on has found support at Rush Presbyterian-St. Luke's Hospital in Chicago, where Dr. Rosalind Cartwright, chairwoman of psychology and social sciences, is studying the dreams of 214 men and women going through separation with the intent to divorce.

By waking people after each REM cycle in the sleep laboratory, Dr. Cartwright is finding out how highly emotional subjects appear in dreams over time. In most dreams, she said, a central issue is carried through the night, and from night to night, from one REM episode to the next, until the person begins to work the problem through.

Dr. Hobson's team has begun a meticulous exploration of dream content, in an effort to tie it to the physiology of REM sleep.

"Dream stories, like literature, are so seductive and compelling that they divert attention from looking at the mental status of dream consciousness," Dr. Hobson said. "So we began to look at the grammar of dreams by analyzing their form and content."

Dream narratives are chopped into fragments and scored along two scales of what Dr. Hobson calls bizarreness. One relates to the plot and its characters, objects, actions, time and place or the thoughts and emotions of the dreamer. The other relates to transformations of characters, objects, situations or emotions.

Dream fragments scored along these lines reveal that characters are inserted (a new person arrives) more often than transformed (a friend turns into your boss). Objects, however, are more often transformed than inserted. In rare instances characters are transformed into inanimate objects (a friend becomes a bucket) and vice versa. Changes of Scene

Because the gait center of the brainstem is activated in REM sleep, Dr. Hobson said, "You are rarely stationary in a dream. You run, walk, skip, drive, fly; you are almost always moving forward."

Changes in the pace of rapid eye movements reflect a change of scene in a dreams, he said. Spikes in the electrical brainstem waves that induce REM sleep are associated with the introduction of new images.

In an intriguing study on dream coherence, Dr. Hobson's group took segments from different people's dreams, recombined them and showed them to other researchers to see if they could tell a real dream from a composite. "Contrary to our expectations," Dr. Hobson said, the judges could not distinguish intact from spliced dreams, suggesting that the observer, not the dreaming brain imposes coherence on a dream.

After many years of research on dreams, Dr. Hobson has come around to the idea that they are not meaningless, as he was once inclined to believe. But neither are they a royal road to the unconscious, as Freud thought, he says.

In Dr. Hobson's view, dreams are what they seem to be -- fragments of mental activity that occur during sleep. These fragments may well turn out to be related in some way to the dreamer's problems or preoccupations, but it is too early to be sure until more progress has been made in sorting out the tangled neurophysiology of the sleeping brain.

By waking people after each REM cycle in the sleep laboratory, Dr. Cartwright is finding out how highly emotional subjects appear in dreams over time. In most dreams, she said, a central issue is carried through the night, and from night to night, form one REM episode to the next, until the person begins to work the problem through.

Photo: Dr. J. Allan Hobson, Harvard Medical School psychiatrist and leader in dream research, says that sleep-promoting transmitters are produced during REM sleep in two cell clumps in the brainstem. He calls these cell groups "REM-on areas." Dreams occur during REM sleep. (Mark Lenihan/Harvard Medical School) (pg. C10) Diagram: Seat of Dreams: 2 Versions In Freud's theory, dreaming involves disguising an unconscious wish. A part of the psyche called the censor transforms the wish into symbols whose meaning is hidden. In newer theories, random electrical signals generated in the brainstem elicit a hodgepdodge of images and feelings. The upper brain concocts a story -- the dream -- to explain them. In REM sleep, the brain is barraged by signals from the brainstem. Impulses fired to the visual cortex produce images that may contain material from the day's experiences, unsolved problems and unfinished business. The Chemistry of Dreams Recent research on the brains of cats indicates brain chemistry changes during sleep. Among the systems of the brainstem are two types of neurons with complementary functions. Working the night side are the cells of the system that is most active in REM sleep. The other system is most active during wakefulness. Sleep inhibition These sites are the reservoir for cells of the sleep-inhibiting system, the neurons most active during wakefulness. Sleep promotion The sleep promoting areas fire impulses to turn REM sleep. The impulses travel to the lateral geniculate body and then to the visual cortex. In new research, these pathways have been more clearly mapped. Stimulating the nearby parabrachial region has a long-term effect, so a subject might get seven days' worth of REM sleep in three days. Long-term REM-on cells Parabrachial region (Sources: Dr. Allan Hobson; "Sleep" (Scientific American Library ); Bettmann Archive (background illustration) (pg. C1) "Brain Function, Day and Night" Schematic representation of the differences in activity of two systems of neurotransmitters and the brain cells they affect. Neurotransmitters of the aminergic system regulate attention, learning and memory; neurotransmitters of the cholinergic system promote sleep, among other things. During waking hours, both systems are active and balanced in non-REM sleep, the balance is maintained, but the levels of both decline. In REM sleep, when dreaming occurs, the balance shifts strongly toward the cholingergic system. (Source: "Sleep," Hobson (Scientific American Library) (pg. C10)