I've seen several versions of this story. An aquarium (or pet store, or rich fish collector) noticed that fish were mysteriously vanishing from a tank at night. After this happened a few times, someone decided to stay overnight to try to find out what was happening. They discovered that an octopus was getting out of its tank, crawling along the floor to an adjacent tank, eating a fish from the other tank, then returning to its own tank before morning.

I know that octopuses can survive outside the water for some time and that they are notorious escape artists, but this story seems like an urban legend to me. Is there any proof that it actually happened?

Researchers and aquarium attendants tell tales of octopuses that have tormented and outwitted them. Some captive octopuses lie in ambush and spit in their keepers' faces. Others dismantle pumps and block drains, causing costly floods, or flex their arms in order to pop locked lids. Some have been caught sneaking from their tanks at night into other exhibits, gobbling up fish, then sneaking back to their tanks, damp trails along walls and floors giving them away.

I know the octopus on Roudriges Island crawl from puddle to puddle on the land exposed by low tide, to hunt trapped fish there. So while I can´t confirm your story, it sounds certainly plausible.
– DanielOct 24 '17 at 14:17

Depending on the distance between tanks, this might be equivalent to biking 2km in a pouring rain so that you don't have to visit the company diner. To me it sounds like a great deal.
– John DvorakOct 30 '17 at 16:50