Data is walking through a corridor, which is filmed with the wide-angle lens the series has used recently to represent dreaming.
He hears an old-timey telephone ringing, and encounters people dressed like miners, pickaxing their way through a bulkhead. He tells them to stop, and then shrieks electronically at them. They respond by pulling him to pieces.
Data wakes up in his quarters, having had a nightmare.
Picard laments that he’s been invited once again to attend the annual Admirals Dinner, and fears he may not be able to escape the ordeal.
The Enterprise-D is getting ready to test a newly installed warp core. A young engineer has a crush on LaForge, and Data cluelessly offers to mediate. He wants to talk to LaForge about nightmares, but the new warp core is glitching, and LaForge is busy.
Troi drops by Data’s quarters to find him watching Spot sleep. He’s worried about the disturbing images in his nightmares, but Troi encourages him to keep trying.
In his next dream, he sees Worf eating a piece of blue cake, hears a telephone ring, sees Crusher sipping at a straw sticking out of Riker’s head, and the workmen are doing something to Troi, who is a slab of cake with a slice cut out. Data then cuts another slice out of Troi, who screams in protest.
Data wakes up in his quarters, where Troi is calling his name. He overslept, which signals to him that something is wrong.
LaForge can find nothing wrong with him in engineering. Next Data consults a hologram of Sigmund Freud, but finds the doctor’s references to sexuality unhelpful, as Data has no sexual urges.
After an admiral scolds Picard for being late, LaForge tells him to try the warp engines now, but they glitch yet again.
While helping LaForge work, Data sees a tool that reminds him of a knife; he sees a mouth on the back of LaForge’s neck, he sees Riker with his cranial straw, and hears the telephone again. He opens up a door in his chest, answers the phone, and hears the voice of Freud saying, “You must kill them all before it’s too late.”
Picard declines the admiral’s offer of a tow, and hovers around engineering, making “helpful” suggestions. LaForge comes pretty close to snapping at Picard, when Tyler (the young engineer with the crush) saves the day by distracting the captain.
A well-filmed horror sequence ends with Data holding a bloody knife. After a comic scene where Data (now confined to his quarters) asks Worf to take care of Spot, some puzzle pieces start to fall together. Crusher notices that most of the crew are infected with parasites, and Picard intuits a connection between all the subplots we’ve been watching.
In a trippy but budget-friendly scene, Data is wired up to the holodeck so that Picard and LaForge can see his dreams. With a little help from Sigmund Freud, and Data himself, the dots start to connect, and the sweet, sweet technobabble flows.
Plenty of Alice-in-Wonderland weirdness, in a budget-friendly, character-driven “bottle” episode (using only the usual standing sets, other than a generic office backdrop for the admiral’s video calls).