Limited life in salt water
Earthworms are terrestrial worms that don't tolerate salt water very well. They therefore have a limited lifespan when used as sea bait. However, the various species of earthworm can occasionally be used as bait and produce results. What's more, to be effective, worms need to be changed very regularly, as they quickly tend to bleach and become inert. To firm up the earthworms, you can add coffee grounds to the container, giving them a better hold on the hook.

Fish with little regard
Unwary fish, such as small rock fish or "soup fish", will usually pounce on anything that moves. An earthworm barely in the water will attract sarrans and girelles, for example, especially if competition for food is strong. In this case, make sure you have enough worms to be able to change them with each catch.
It is also possible to fish with earthworms in harbour areas, where fish are used to feeding on all the "garbage" thrown overboard. It's also worth noting that a worm, even a dead one, can attract various species of gobies or blennies when mounted on a sinker head and animated on the bottom.

Mainly in estuaries
If you fish in or near estuaries, the use of earthworms on your hooks may bring you some nice surprises. All species of estuary fish are likely to feed on earthworms. Flounder, sole, eel, bass and mullet will all appreciate a well-presented earthworm.
A nice earthworm mounted on the back of a special mullet spoon remains a productive technique on the various species of mullet found in brackish waters. For greater efficiency, the triple spoon should be replaced by a long single hook on which the worm can be baited.
The earthworm is therefore an emergency bait, which can be used whole or in bunches, mainly to fish estuaries.