But You Were There and You and You

When a character tells a story or has a dream of a completely unrelated event in which people he already knows fill in for the roles of the story.

This is something of a Truth in Television because people do tend to have people they know in their dreams.

Subtrope of And You Were There. See also Visions of Another Self and Her Codename Was Mary Sue.

Anime & Manga

 * Tenchi Muyo!: Mihoshi Special, Mihoshi tells the Masaki Household a story of her greatest Galaxy Police adventure, casting the various characters of the show in the roles of various players in her story. She doesn't even bother to change their names to those of the characters in her story, to much ongoing annoyance of her audience.
 * An episode of Azumanga Daioh uses this: Osaka, Tomo, Sakaki and Kaorin have dreams in the New Year's morning involving their friends. In all of them, Chiyo-chan made an appearance - not to mention Chiyo-dad's formal debut in Sakaki's dream.

Film

 * The Wizard of Oz - The Trope Namer, in which after waking up, Dorothy realizes that the Tin Man, Cowardly Lion and Scarecrow bear more than a passing resemblance to the ranch hands.
 * She also notices that the travelling mystic looks an awful lot like a certain wizard and sees Miss Gulch turn into the wicked witch, though she does not mention the latter upon returning home/regaining consciousness.
 * Mirror Mask: The Prime Minister is Helena's dad, and the Queens of Light and Shadow are both her mother. Oh, and.
 * In the Abbott and Costello film Jack and the Beanstalk, Costello's character dreams that he is Jack, and all the other characters in the story are people he knows in real life.
 * Implied in the 2010 Alice in Wonderland that Alice used this reaction to dismiss her first visit to Wonderland as a dream. There's an old woman who has traits of the Red Queen, and twins that behave like Tweedle Dee and Tweedle Dum. Subverted on her return to Wonderland when she decides it wasn't all a dream.
 * Sherlock, Jr.. plays this straight, with all of the characters in the framing story playing similar roles in the dream sequence that constitutes the bulk of the film.
 * Inception: this must have been at least one of Fischer's reactions when he woke up immediately after the inception.
 * Inverted in Paperhouse: Anna dreams of Mark, a boy who does exist in reality but also whom she has never met.
 * The 1986 version of Babes in Toyland. Most even have the same names.
 * Sucker Punch: They're hallucinations, not dreams, but still.

Literature

 * Piwem i Mieczem ("With Beer And Sword"), an episodic story published in Top Secret, involved a character going to a fantasy world and meeting comrades who were all based on the magazine's editors.
 * In Les Misérables Jean Valjean has a very strange dream where he meets up with his brother.

Live Action TV

 * Gilligan's dreams on Gilligan's Island are always like this.
 * Buffy the Vampire Slayer - comatose child Billy is causing everyone's nightmares to come true - when Buffy and friends finally wake him at the hospital he says "I had the strangest dream! You were there, and you...who are you people?"
 * The MacGyver Old West dream episodes: "Serenity" and "MacGyver's Women".
 * All That had a parody of The Wizard of Oz called the wizard of coz. At the end of the sketch, Dorothy says the quote, and nobody believed her.
 * Arabian Nights (2000 mini-series): When Scheherazade tells Shahryar the tale of the Sultan and the Beggar, Shahryar pictures himself as the tormented and possibly mad Beggar, his brother as the cruel Sultan, and his principled but loyal Grand Vizier Ja'Far as the cruel Sultan's principled but loyal Grand Vizier.
 * In the Leverage episode "The Van Gogh Job", the World War II-era backstory of the van Gogh the team is trying to retrieve gets told to Parker by its current owner; she fantasy-casts members of the Leverage team in all the appropriate roles of the story.
 * The Noir Episode of Smallville, where Jimmy dreams the entire cast into a world of thirties cynicism. Notably, his casting suggests his subconscious knows more about them than he realises; for instance, he casts Clark as an undercover cop, and on awakening thinks the idea of Clark secretly being a crimefighter came out of nowhere.
 * JAG has three examples - "Mutiny" (re-telling the attempted mutiny aboard the USS Somers), "Ghosts of Christmas Past" (the day Harm's father was shot down) and "Each of Us Angels" (a WWII period piece about hospital ships), where the cast fills various roles after a framing story is established in the present.
 * This was used during the Wizard of Oz inspired episode (The Wizard of Song) of The Fresh Beat Band
 * When Hustle based a con on "The Emperor's New Clothes", they did a quick fairy-tale-theater reenactment of the story with the regular cast members.
 * In "The Blue Butterfly", Castle had Rick reading a diary about a decades-old murder and imagining himself as the private detective, Beckett as the Femme Fatale, and the rest of the major characters in various supporting roles.

Music
"Everyone that I know And everyone that you know was in my dream I saw a vampire I saw a ghost Everybody scared me But you scared me the most"
 * From the song "Last Night I Had a Dream" by Randy Newman:

Newspaper Comics

 * Yet another The Wizard of Oz parody occurs in the final The Far Side strip, when cartoonist Gary Larson wakes up surrounded by his relatives: "All the cows looked just like you [to a relative with a bovine face]...All the scientists looked just like you...All the nerdy kids looked just like you..."

Theater

 * In Fellowship! The Musical, The Balrog sings a lounge act entitled The Balrog Blues, about how he was woken up from a "delightful little dream". His description of the dream parodies this - while pointing at members of the audience, he says: "well you know, you were there, and you were there, and y... who the hell are you? Why don't you get out of your mom's basement and get a job? Sheesh."
 * The prelude to Alice in Wonderland Jr. takes place in the park where Alice' sister Mathilda instructs Alice on history. There's a boy in a white vest for the White Rabbit, a child blowing bubbles for the Caterpillar, and kids playing Ring-Around-the-Rosie for the Caucus Race.

Video Games

 * Sonic Storybook Series - Sonic is transported into the book 1001 Arabian Nights and finds that Ali Baba, Sinbad and the emperor/sultan take after the appearance of Tails, Knuckles and Eggman, respectively.
 * Happens again in Sonic and the Black Knight: Knuckles - Sir Gawain, Shadow - Sir Lancelot, Blaze - Sir Percival, Silver - Sir Gallahad, Jet - Sir Lamorak, Amy - Lady of the Lake, and apparently.
 * The Legend of Zelda Ocarina of Time inverts this trope by having several real world characters (Malon, Talon, Kaepora Gaebora) that are based on characters that originally appeared in a dream in The Legend of Zelda: Link's Awakening (Marin, Tarin, Owl).

Webcomics

 * In Fite!,

Western Animation
"Leela: I was having the most wonderful dream. (beat) Except you were there, and you were there, and you..."
 * The Simpsons has done a few episodes like this. The original "Treehouse of Horror" featured a sequence based on Edgar Allan Poe's "The Raven", with Homer as the narrator and Bart as the titular bird. This was later done in "Simpsons Bible Stories", "Simpsons Tall Tales", "Tales from the Public Domain" and "Simpsons Christmas Stories".
 * The Wizard of Oz example is parodied in Futurama.


 * Bender is talking in his sleep, droning "Destroy all humans...". Fry frantically wakes him, and he says "Why'd you wake me? I was having the most wonderful dream - and you were in it!"
 * Used on Arthur in "D.W.'s Name Game" with an Or Was It a Dream? twist when a character that was original to the dream appeared outside D.W.'s window.
 * The Musical Episode of Pepper Ann ended with Pepper Ann waking up from her musical dream, and telling each of the people surrounding her that they were in it. Pink-Eyed Pete asks if he were in the dream, and she answers, "no," causing him to go off and sing sadly about his lack of respect.