Whether it is a stroll on the beach or a trip in the space shuttle researchers are testing a new iPhone app to see if it is possible to craft the perfect dream.
Developed by British psychologist Richard Wiseman, the Dream:ON app plays a soundscape to evoke the sensation of being in a particular environment during the stage of sleep when dreams occur.
"If it's birds tweeting, then the idea is that you'll hear birds tweeting in your dream," said Wiseman.
There are 20 soundscapes with themes such as Wild West, Space Shuttle and A Trip to Tokyo.
After choosing a wake up time and soundscape, the user places the iPhone face down on the mattress and the app monitors body movements throughout the night.
During the last 20 minutes of sleep, the app plays the soundscape if the dreamer is in REM sleep, a state when body movements are suppressed and dreams most likely occur.
The app activates the alarm when the user is coming out of REM sleep because there is only a ten-second window when a dream will be remembered, according to Wiseman.
"Ten seconds later and it's gone," he said, adding that dreams are likely to occur in the last 20 minutes before waking.
Users are then prompted to submit their dream to the database which will be analyzed by Wiseman and his team.
The researchers are also studying whether they can help to induce lucid dreams, which is a state when you are conscious that you are dreaming and try to control the dreams.
"Some of our soundscapes have a voice-over which tells you that you're dreaming and that it's okay for you to take over that dream. And one of the questions we're asking is 'Do those induce lucid dreams?'" Wiseman said.
According to Allan Hobson, a dream researcher and professor of psychiatry emeritus at Harvard University, lucid dreaming is a rare occurrence.
"There's no question that you can influence the plot of your dreams. But lucid dreaming is rare because it's a design error; it shouldn't happen," Hobson said.
"The body doesn't want to be awake and asleep at the same time -- the brain wants to be in one state or the other," he added.
Wiseman came up with the idea for Dream:ON while researching the link between external stimuli and sleep.
"I had the idea of giving people a proper night's dream with the idea really being twofold. The mood you're in the next morning is related to the last dream you have before you wake up.
You put people in a better mood and they're more productive and happier," he explained.
He hopes that the app could be used to help people suffering from depression.
"The research into depression and dreaming is quite well established in that (depressed people) dream more, and their dreams are more negative," said Wiseman.
Since its launch at the Edinburgh International Science Festival
last week the app has had 300,000 downloads, and has collected data
from over 200,000 dreams.