Owners of iPhones who download the app will turn their phones into a “dream factory” able to play a customized “soundscape” designed to influence the mind into dreaming about pleasant scenes, such as lying on a beach.

The sounds will be played only when the iPhone app’s motion sensor detects that sleepers are not moving — the time when dreaming begins.