A PC in Curse of Strahd has the opportunity to be cursed by Mother Night, at which point they are (emphasis mine):
haunted by horrible dreams every night lasting from dusk until dawn...A creature cursed in this way gains no benefit from finishing a short or long rest at night (resting during the day works normally, since the curse is dormant from dawn to dusk).
On the other hand, a PC who eats a dream pastry (emphasis mine):
must succeed on a DC 16 Constitution saving throw or fall into a trance that lasts for 1d4 + 4 hours, during which time the creature is incapacitated and has a speed of 0 feet. The trance ends if the affected creature takes any damage or if someone else uses an action to shake the creature out of its stupor.
While in the trance, the creature dreams of being in some joyous place, far removed from the evils of the world.
As luck would have it, one of the PCs in my current CoS campaign has been cursed, although he has not yet slept. He is also the only PC to have previously eaten a dream pastry. If he realizes the effects of the curse and decides to counteract it with a dream pastry, what would happen?
RAW are ideal, perhaps drawing on precedent for the power of curses vs. magic items, or divine magic vs. fiends. If no RAW answer is forthcoming, an answer can separate itself from mere opinion by relating experience (what happened in your campaign and how it was received), lore relationship between hags and Mother Night, or lore from the Ravenloft setting in any edition.