I recently ran a pretty successful dream sequence in a campaign. Some of the main ways I made it dream-like were:
- Limiting player agency with respect to the course of the dream, but encouraging agency with respect to details
- Incorporating significant PC backstory details
- Incorporating many recent characters, places, and events
- Taking impossible, factually wrong, and otherwise absurd situations for granted
Limiting player agency with respect to the course of the dream, but encouraging agency with respect to details
In real life, dreamers progress through winding or disjointed scenes with little or no control over the experience. In RPGs, this can be represented by a careful reduction in player agency. PC decisions about the broad progression of the dream, or vague motivations can be taken out of player hands. For instance, a PC lingers too long in a scene, and the GM says "you suddenly remember you agreed to meet with your friend today; you begin to rush to the meeting point. After a while running a thought enters your mind: you don't remember what your running from. Do you keep running?".
However, to counterbalance this reduction, players should be given more freedom in determining specifics of the dream. Players should be free to choose their PC's outfits. If a PC is just entering a scene, the player should be free to choose how they enter and what they were doing before. Any details which don't significantly change the course of the dream should be left to the players, if they choose. For example, the GM plans a scene in the dream for one PC, but the PC asks if they can gather their party to help them. The scene will still work with the whole party, so the GM says "of course; you've had them with you the whole time."
Incorporating significant PC backstory details
Using characters, places, or events from a PCs backstory can strongly tie PCs into the scene. Additionally, it can set player expectation for how their characters should behave. In a peaceful dream, a character might wake up in their childhood bedroom. In a nightmare, they may encounter a long dead tormentor.
Incorporating many recent characters, places, and events
Dreams in real life often mimic current events. A collage of recent places the PCs have been and characters they have seen makes for a very dream-like setting. These people and places don't have to play the same role they do in the campaign's "real world", and often shouldn't. For instance, a large banquet hall from a recent ball may serve as a family dining room, and an NPC couple who a PC got along with may now be the PCs loving moms.
Taking impossible, factually wrong, and otherwise absurd situations for granted
This is the most overt tool for making the narrative dream-like. Dreams don't make sense upon close inspection, but there should still be a loose logic to them. In dreams, people row boats across land to commute to their office job. Of course, rowing the boat on land is arduous, and requires the strongest PC to row it. That rat is a paladin, and has plate armor. He's also your coworker, since you're a paladin too, so you need to give him a lift to the office. The PC you don't get along with? That scamp is causing innocuous trouble out in your field, like always.