You ever watch your pets sleeping? When they twitch their paws and whiskers, and yip and mewl? Well, cats and dogs experience REM sleep, which means they're probably dreaming. And, while evidence of REM sleep has so far not been seen in octopuses, they do have a kind of sleep twitch of their own.

Sleeping octopuses flicker. While they rest, some neuronal firing in their optic lobe causes their chromatophores, or pigment-containing cells, to become active.

As a result, the octopuses shift between colours and patterns while they snooze, as though they're reacting to something that only they can sense.

This effect is seen beautifully in a newly released video, filmed for the documentary Octopus: Making Contact on Nature on PBS. It's narrated by marine biologist David Scheel of Alaska Pacific University, who explains the colour changes of a sleeping octopus named Heidi.

These colour and pattern shifts seem consistent with real-world behaviours - Scheel links them to possible real-life encounters.

We don't really know for sure why we dream, but scientists believe it has something to do with the way the brain processes and stores memories. If that's the case, it would make sense that many animals dream - even cephalopods, whose intelligence is rather different from how the mammalian brain works.

Although REM sleep hasn't been recorded in octopuses, another cephalopod has evinced something similar. A 2012 study found that cuttlefish Sepia officinalis "display a quiescent state with rapid eye movements, changes in body colouration and twitching of the arms, that is possibly analogous to REM sleep."

Heidi isn't the only octopus filmed changing colours while sleeping. In October 2017, Rebecca Otey, who had been interning at The Butterfly Pavilion invertebrate zoo, filmed a sleeping Caribbean two-spot octopus (Octopus hummelincki) and posted the video to YouTube last year.

We do know that octopuses use their amazing colour-changing ability for camouflage. You'd think involuntary colour spasms would ruin that camouflage, but you can rest as easily as the octopuses on that score. They build themselves hidden dens, where they retire for naps.

If any neuroscientists out there want to look into octopus dreaming, we'd love to know what they find.