Researchers in Japan used MRI scans to predict the images that people were seeing as they entered into an early stage of sleep.
Writing in the journal Science, they reported that they could do this with 60% accuracy.
The team now wants to see if brain activity can be used to predict other aspects of dreaming, such as the emotions experienced during sleep.
Professor Yukiyasu Kamitani, from the ATR Computational Neuroscience Laboratories, in Kyoto, said: "I had a strong belief that dream decoding should be possible at least for particular aspects of dreaming... I was not very surprised by the results, but excited."
People have been trying to decipher dreams since ancient Egyptian times, but the researchers who have carried out this study have found a more direct way to tap into our nighttime visions.
The team used MRI scans to monitor three people as they slept. Just as the volunteers started to fall asleep inside the scanners, they were woken up and asked to recount what they had seen.
Each image mentioned, from bronze statues to keys and ice picks, was noted, no matter how surreal.