IIRC the cheese thing is basically a myth, any heavy food in your stomach when you sleep will cause you to sleep less deeply, wake more often, and consequently, remember more of your dreams.
Funny that some medications have these dream effects. An uncommon side effect of Montelukast is vivid nightmares and sleep paralysis. It’s a relativity common asthma control medication, but was recently moved to a not-recommended status for younger people because of this side effect. My personal experience was pretty intense nightmares 1-2 times a week if I took it before bed. Taking early in the day stopped this side effect.