Well there are mudskippers [0] [1] which can end up crawling up to and resting on branches and trees growing out of the water. So while it seems untrue, it wouldn't be far fetched for a species of octopus adapted to end up doing so, especially if the out of water circumstances are narrow enough(very temporary, trunks & branches very close to water, etc).