When you turn a shark upside down like the octo did, it makes them somewhat imobile. It kind of puts them to sleep. I have seen researchers turn over a tiger shark on its back and it was as calm as could be, They cut open a 4 inch slit, implanted a tracking device, and sewed it up and the shark didn't even flinch.
That was so cool! I swear Octopus are very smart....When you look at them diving, they definitely are looking back at you and thinking, unlike the fish.