That was such an unspeakable letdown.
The Dick van Dyke Show had two episodes where “it was just a dream”, but they were both so weird and trippy that it wasn’t a drawback. Especialy with the “dreams withi dreams”.
One was the classical “It May Look Like a Walnut” (Season 2, episode 20, aired Feb 6, 1963), where they had the dream about Kolak of Twilo invading (wher our own Kolak got his name from). It’s the one with the closet full of walnuts. It also has the sneakiest way of giving the ceklebrity producer a cameo. Usually introducing a celebrity into a middle class family sitcom is awkward, but in this case Kolak of Twilo looks exactly like Danny Thomas – only he has a British accent.
The other episode is “I’d rather be bald than have no Head at All” (Season 3, episode 31, aired April 29, 1964) where Rob is afraid he’s going bald, and tries a weird concoction on his head. In this one, they say during the dream that it’s a dream.
Wasn’t the dreadful final episode of Roseanne a variation of “only a dream”?
I’d given up on Roseanne a couple of years before the final season so I didn’t see it.
The Strange Affair of Uncle Harry (1945) ends with a “whew!—it was all a dream” owing to Production Code issues, effectively undermining the dark tone of the film and soiling it.
The Chase (1946) and Femme Fatale (2002) feature “surprise—it was all a dream” sequences in the middle of the film rather than at the end.
Night of the Following Day (1969) is standard “it was all a dream, but it restarts in reality at the end” fare.
The Discreet Charm of the Bourgeoisie (1972) is perhaps outside the op’s parameters, but does feature various characters waking up in the dreams of others.
Also the alternate ending to Breaking Bad, which plays out very similarly.
That “Dallas” thing kicked off the whole genre, really.
A decade later, Katey Sagal was pregnant and they wrote it into the show, “Married With Children”. When the baby died at 7 months’ gestation, they wrote that it too was a dream.
Maybe, but IIRC there were no dreams.
That one’s a nightmare, regardless of what you may believe. I actually watched it when the opportunity presented itself, after I got Netflix, because I’m from Des Moines, where it was shot, and did recognize some of the landmarks even though it had been more than 30 years, at the time.
The whole plot of “The Stand”, in all its iterations and the fanfiction I’m reading now, is based on dreams.
I suppose H. P. Lovecraft’s The Dream-Quest of Unknown Kadath, one of his longest and IMHO best works, doesn’t really qualify. Almost all of the story does take place in a dream, but it’s made explicit from the start of the story that it’s taking place in a dream.
In “The Midnight Sun” Norma and her landlady suffer as the Earth moves closer and closer to the Sun. The twist ending is that Norma is having a nightmare, and the Earth is rapidly freezing everyone to death as it moves further away from the Sun.
“Perchance to Dream” has a patient describing terrible nightmares to a psychiatrist. It turns out the patient had wandered into the psychiatrist’s office, collapsed unconscious on the couch, and died in his sleep, having one final nightmare.
There are several other episodes that are arguably dreams, but might also be hallucinations, premonitions, etc.
The St. Elsewhere finale came two years after Bobby’s death on Dallas, and Newhart ended three years after that. I’ll leave it to the Teeming Millions to decide whether St. Elsewhere was a return to Twilight Zone-style twist endings or a nose-thumbing to Dallas, and whether Newhart was lampooning the entire “it was all a dream” gnere or just one specific program.
There are several Black Mirror episodes that might qualify. I can think of three or four off the top of my head, although I won’t mention details to avoid spoilers. Often it’s not literally a dream however, but rather some kind of technology-related experience. Mostly they were handled very well and didn’t feel like a cheat at the end.