False memories have been implanted into the brains of sleeping mice for the first time, leading them to seek out the happy place created in their dreams.

Published in the journal Nature Neuroscience, researchers have for the first time been able to show memory manipulation during sleep.

The researchers, from the French National Centre for Scientific Research (CNRS) in Paris, say their findings could lead to new ways of treating people with depression, post-traumatic stress disorder or trauma victims.

In the study, scientists implanted two electrodes into the brains of mice, one in a region of the brain's memory centre (the hippocampus) and the other in the brain's reward centre.

In humans and mice, our brain maps out our environment by place cells, which work like grid coordinates. The team picked a place and worked out which location it corresponded to for the mouse.

When the mouse was asleep, they rigged up the electrodes so that whenever the place cell became active, a reward stimulation was delivered to the brain.

Even though this was happening while the mouse slept, when it woke up it had learned to associate the place with a reward and would seek it out accordingly: "When they woke up the mouse went straight to that place as though it was waiting for a reward," research leader Karim Benchenane told the Guardian.

The authors wrote: "By triggering intracranial rewarding stimulations by place cell spikes during sleep, we induced an explicit memory trace, leading to a goal-directed behaviour toward the place field."

Researchers believe this technique could pave the way for memory manipulation in humans, but that the ethical and safety implications will need to be fully assessed before testing it: "It might be extremely dangerous to get a reward for something fearful," Benchenane explained.

However, he said the implications are huge, telling the Sydney Morning Herald: "It's almost like science fiction. It shows that memories can be tampered with."