WASHINGTON - Doctors have long advised that a good night's sleep is important for memory -- but researchers now say a familiar scent wafting in the bedroom might help sometimes, too. The caveat: In the study, being published Friday in the journal Science, it only worked for some kinds of memories and during one stage of sleep, meaning it's not the answer for people hunting a quick memory boost.

German scientists used medical students as their guinea pigs, having them play a computer version of a common memory game: They turned over pairs of cards to find each one's match.

Some played in a rose-scented room. Later that night, while they were in a deep stage of sleep known as slow-wave sleep, researchers gave them another whiff of roses.

The next day, the rose-scented sleepers remembered the locations of those cards better than people who didn't get a whiff -- they answered correctly 97 percent of the time compared with 86 percent.

People exposed to the odor during the lighter dream stage of sleep known as REM sleep saw no memory boost.

Nor did scent aid memory when the students tried a different trick, learning a finger-tapping sequence, neurobiologists from the University of Lubeck reported in Friday's edition of the journal Science.

What happened? Anyone who's ever gotten a whiff of a particular odor and flashed back to an emotional memory -- grandma's apple pie, say -- knows that scent and memory can be intertwined.

With the card game, the odor reactivated the day's new memories of object placement, allowing a now-resting brain to consolidate them, the researchers wrote. But because different parts of the brain are involved with different types of memory, the odor didn't play a role with the more numerical finger-tapping test.