Cat fish Crazy is correct. Earthworm need to breathe atmospheric air. The burrow into the the substrate because it is instinctive, but they will DROWN.
You don't tell us what size your fish are that you feed the worms to. Earthworms too are not good for tropical aquaria fish. They exude a slime from their bodies which is toxic to small fish. This is the worms natural defence against being infected by harmful bacteria whilst in the soil. If you wish to feed your fish live food why not culture yourself some microworms. They are easy to culture and very nutritious for your fish. Failing that why not go to your LFS and purchase live daphnia,glassworm or bloodworms.
Lot better and ess harmfl than earthworms. Now you may be saying to yourself, shops sell earthworms for fishing- and you would be correct in your statement. The worms they sell have been specially bred so that the don't contain any impurities. If you disect one you will find that it's gut is free of soil which house billions of harmful bacteria.
I hope that I haven't put you off, but FREE is not always best, especially for your aquatic friends.