Here's a video of an octopus changing color while it's asleep. Are the patterns in response to a dream?
Possibly, suspects the Alaska Pacific University professor David Scheel. That video is from an upcoming PBS TV show called "Octopus: Making Contact", and in it, Scheel narrates the color changes thusly:
"She's asleep; she sees a crab and her color starts to change a little bit. Then she turns all dark. Octopuses will do that when they leave the bottom.
"This is a camouflage, like she's just subdued a crab and now she's going to sit there and eat it and she doesn't want anyone to notice her. It's a very unusual behavior, to see the color come and go on her mantle like that. I mean, just to be able to see all the different color patterns just flashing one after another — you don't usually see that when an animal's sleeping. This really is fascinating."
The truth is, we don't actually know if cephalopods dream. There is some scant observational data, as this piece in Atlas Obscura noted a while ago:
The only cephalopod with a proven penchant for dreaming is probably the cutest. A 2012 study led by Marcos G. Frank, now a neuroscientist at Washington State University Health Sciences Spokane, discovered that sleeping cuttlefish demonstrate a form of rapid eye movement (REM), the same stage of sleep that gives us our dreams, distinguished by the spontaneous activation of brain cells, going off like fireflies in a forest. For a cephalopod, this manifests in frantic eye movements under closed lids (octopuses: they're just like us) or erratic shifts in skin coloration (or not). In Frank's study, the sleeping cuttlefish's chromatophores recombined into recognizable patterns, just like ones they displayed while awake. He believes this might be analogous to the weirdly familiar patchwork of human dreams. "This video is the best evidence I have ever seen that this particular cephalopod has a sleep-state similar to what we saw in cuttlefish," Frank says of the Caribbean two-spot octopus.