This spell shapes a creature's dreams. Choose a creature known to you as the target of this spell. The target must be on the same plane of existence as you. Creatures that don't sleep, such as elves, can't be contacted by this spell. You, or a willing creature you touch, enters a trance state, acting as a messenger. While in the trance, the messenger is aware of his or her surroundings, but can't take actions or move.
If the target is asleep, the messenger appears in the target's dreams and can converse with the target as long as it remains asleep, through the duration of the spell. The messenger can also shape the environment of the dream, creating landscapes, objects, and other images. The messenger can emerge from the trance at any time, ending the effect of the spell early. The target recalls the dream perfectly upon waking. If the target is awake when you cast the spell, the messenger knows it, and can either end the trance (and the spell) or wait for the target to fall asleep, at which point the messenger appears in the target's dreams.
You can make the messenger appear monstrous and terrifying to the target. If you do, the messenger can deliver a message of no more than ten words and then the target must make a Wisdom saving throw. On a failed save, echoes of the phantasmal monstrosity spawn a nightmare that lasts the duration of the target's sleep and prevents the target from gaining any benefit from that rest. In addition, when the target wakes up, it takes 3d6 psychic damage.
If you have a body part, lock of hair, clipping from a nail, or similar portion of the target's body, the target makes its saving throw with disadvantage.
* - (a handful of sand, a dab of ink, and a writing quill plucked from a sleeping bird)
All of the ideas about using Dream as a spell to assassinate a target by way of exhausting are interesting, but there is an issue. If you say that the target gains exhaustion because Dream has denied them a long rest, then the target can simply attempt another long rest immediately after waking. If you say that the target doesn't gain exhaustion because they've finished a long rest but Dream denies them recovering their resources, then the target will not be in immediate danger of exhaustion and would likely be careful the following day since they didn't get their spells/hit die back.
All that said, this spell is great to have a foe hinder a party member.
Most games gave a concept of time, if days go by without rest from dream resets, that would be abnormal. However they could waste all their spell slots quickly and they may recover.
most dms wouldnt wait for you is my guess
maybe onednd will add a limit if resisted