There is an old theory that eating cheese before bed causes bad dreams, although scientists don't have much evidence to prove it.
But if cheese can't make us dream, new research from the US says that perhaps an app could — and they don't have to be bad dreams!
Researchers experimented with an app that they designed to encourage people to have lucid dreams. These are dreams that feel vivid and real.
During lucid dreams, people know that they're dreaming and may even be able to control what happens in the dream.
Not everyone has lucid dreams. It's thought that about half of us will have them during our lives, but some people may have them regularly.
Lucid dreams may be useful for us: experts think they could encourage creativity and problem-solving, or help us with nightmares.
The app in the study used a method called "targeted lucidity reactivation" that is supposed to make people more likely to experience lucid dreams.
This is usually done in a laboratory, but the researchers wanted to see how effective an app used at home could be.
They did two experiments to see if the app could increase the frequency of participants' lucid dreams.
The first experiment included 19 participants. Before going to sleep, they did a 20-minute activity that encouraged them to enter a "lucid mindset" when they heard certain sounds.
These same sounds were then played during the night. The frequency of the participants' lucid dreams more than doubled during the week of the experiment.
Fifty people completed the second experiment. They were put into three groups, with one group using the targeted lucidity reactivation method.
The people in this group reported that they had experienced more lucid dreams during the week of the experiment than those in the two control groups.
The researchers said these results suggest that apps like this could help people to use sleep for "personal benefits" including "spiritual and personal growth."