The World Federation One Stop Fiqh

Ruling 2633

If a fish springs out of the water, or a wave throws it out, or the water recedes and the fish is left stranded on dry land, then in the event that someone catches it with his hands or by some other means before it dies, it is lawful to eat after it dies. But if it dies before it is caught, it is unlawful to eat.