It’s snowing heavily, and everyone in the backyard is in a swimsuit, at some kind of party: Mom, Dad, the high school principal, there’s even an ex-girlfriend. And is that Elvis, over by the piñata?

Uh-oh.

Dreams are so rich and have such an authentic feeling that scientists have long assumed they must have a crucial psychological purpose. To Freud, dreaming provided a playground for the unconscious mind; to Jung, it was a stage where the psyche’s archetypes acted out primal themes. Newer theories hold that dreams help the brain to consolidate emotional memories or to work though current problems, like divorce and work frustrations.

Yet what if the primary purpose of dreaming isn’t psychological at all?

In a paper published last month in the journal Nature Reviews Neuroscience, Dr. J. Allan Hobson, a psychiatrist and longtime sleep researcher at Harvard, argues that the main function of rapid-eye-movement sleep, or REM, when most dreaming occurs, is physiological. The brain is warming its circuits, anticipating the sights and sounds and emotions of waking.

“It helps explain a lot of things, like why people forget so many dreams,” Dr. Hobson said in an interview. “It’s like jogging; the body doesn’t remember every step, but it knows it has exercised. It has been tuned up. It’s the same idea here: dreams are tuning the mind for conscious awareness.”