Why Do Earthworms Gather at the Top of Compost Bins or Worm Farms and Try to Escape?

Compost worms in worm farms and earthworms in compost bins can often be seen gathering in large numbers on the surface or inside the lid, seemingly trying to escape. This can be due to impending rainy weather, unfavorable conditions in the compost/worm farm, or the addition of something into the compost/worm farm that is toxic or an irritant to them.

1. Earthworm Sensitivity to Barometric Pressure Changes

One of the most commonly reasons for worms to gather at the top of compost bins is when it’s about to rain. Before it begins to rain, the barometric pressure (air pressure) in the atmosphere drops, and both earthworms and compost worms can sense this, as they are highly sensitive to changes in barometric pressure.

If it rains, the earthworms and compost worms run the risk of their soil or compost environment becoming waterlogged, which can cause them to drown, or more correctly, suffocate, as they actually breathe through their skin. When soil becomes saturated with water, it contains very low levels of oxygen because the water pushes the air out of the spaces between soil particles, which make it difficult for worms to breathe, triggering their instinct to move upwards to avoid drowning/suffocation. This natural survival mechanism, commonly referred to as “rain migration,” also occurs in the wild, where earthworms often surface in large numbers after a rainstorm.

How Do Earthworms and Compost Worms Breathe?

Earthworms breathe through their skin by a process called diffusion. Since they lack lungs, oxygen is absorbed directly through their moist skin, which is crucial for gas exchange. Oxygen from the environment dissolves in the moisture on the worm’s skin and then diffuses into the bloodstream, while carbon dioxide, a waste product, is expelled in the opposite direction. This exchange occurs because the concentration of oxygen outside the worm is higher than inside, allowing it to naturally flow into the worm’s body, evenly distributing itself much like how smoke fills a room.

For this diffusion of oxygen through the skin to work efficiently, an earthworm’s skin must remain moist. If it dries out, the worm cannot absorb oxygen and may suffocate. Due to this reliance on moisture, earthworms and compost worms are often found in damp environments or emerge after rain, and are sensitive to their environmental conditions.

2. Chemical Imbalances in the Compost or Worm Farm

If there is no rain in sight and worms are still gathering at the top of the compost bin or worm farm, this may be because the environmental conditions within the compost system or worm farm are unfavorable to them, leading them to try to escape to a more hospitable environment.

Conditions that earthworms and compost worms may find detrimental include:

Acidic conditions and pH Imbalance

Earthworms and compost worms grow, reproduce and thrive best at a neutral pH (7.0), but can tolerate a pH from 5.0 (slightly acidic) to 8.0 (slightly alkaline). They will not survive in compost piles with a pH lower than 5 or higher than 9.

In compost piles, the optimal pH for compost microorganisms between 5.5 and 8.5, from slightly acidic through neutral to slightly alkaline. As bacteria and fungi in the compost break down organic matter, they release organic acids, which often accumulate in the early stages of composting, and lower the pH. These acidic conditions encourage the growth of fungi which break down of lignin and cellulose, which are major components of plant cell walls that are more resistant to breakdown. As composting proceeds, these organic acids are usually broken down further and neutralized, resulting in a mature compost that generally has a pH between 6 and 8.

  • If anaerobic conditions develop during composting because the compost pile is overly wet, or lacks sufficient aeration, the organic acids can accumulate rather than break down and lower the pH to 4.5, making it very acidic and severely limiting microbial activity. If this happens, earthworms will try to escape the overly acidic environment. Aerating or mixing the compost should create aerobic conditions, allowing oxygen back into the compost, which will reduce this acidity. 
  • The addition of a large amount of acidic compost materials such as citrus can also sudden change the pH to become very acidic and drive worms to flee the compost bin.

Temperature Extremes

If compost bins get too hot because the contents inside heat up as they decompose, earthworms will rise to the surface to avoid being cooked.

Earthworms and compost worms, like all insects, are ectothermic (cold-blooded) organisms. This means their body temperature is influenced by their environment rather than regulated internally. They rely on external sources of heat to regulate their body temperature, and their metabolism increases as temperature rises, as does their activity. This makes them highly sensitive to temperature changes and can significantly affect their survival.

  • Overly Hot Conditions: Worms prefer temperatures between 15°C and 25°C (59°F to 77°F). If temperatures rise significantly above this range, due to the compost bin or worm farm being exposed to hot sun, or the compost bin being filled with nitrogen-rich materials that generate heat as they decompose (thermophilic or hot composting), worms which are mesophilic, favoring moderate temperatures, will attempt to escape to cooler areas to avoid heat stress. Prolonged exposure to temperatures above 35°C (95°F) is fatal to them.
  • Overly Cold Conditions: To escape low temperatures, worms tend to burrow deeper into the ground rather than rise to the surface.
    • Most earthworms don’t tolerate temperatures below freezing either, and can burrow down deeper into the soil to escape both overly hot or cold temperatures. They can take care of themselves in compost piles or compost bins.
    • Composting worms, on the other hand, do not burrow in the earth like regular earthworms, as they naturally live above the ground in the leaf litter layer. This is why the bedding layer of cardboard, shredded paper, coconut coir, or decomposing leaves is important as the base layer in worm farms, with a layer of food on top of it, as some kind of cover like a damp hessian bag or newspaper as a ‘worm blanket’ over the top to simulate their natural protected environment.

Unlike compost bins, which benefit from being in a sunny spot for faster composting, it’s important to place the worm farms in a shady area, not in direct sun, such as the shady side of a house, shed, or garage, because temperatures don’t fluctuate as much in protected locations. Even side of the house that receives only morning sun is suitable. Placing worm farms under the cover of the roof eaves or a deck or purpose-built cover that repels rain but still allows good air circulation will reduce the impact of temperature extremes. Worm farms that are not exposed out in the open to get wet can also be covered with insulating materials such as blankets or straw to keep them warm in winter.

Moisture Levels

Earthworms need a moist environment for survival, as their skin must remain wet to allow them to breathe, The optimum moisture content in a worm farm is around 70-85 percent, which is a bit damper than a composting pile, which typically has around 50-60 percent moisture.

Excess of moisture in both compost bins and worms farms can lead to waterlogged conditions, suffocating the worms. They can survive in completely saturated conditions for short periods of time, but will try to escape when the oxygen starts to run out. Too little moisture on the other hand can impeded their movement, ability to feed, and desiccate them (dry them out). Worms will move away from excessively wet or dry areas. and seek out optimal moisture levels by moving up or down within the compost or worm farm.

3. Toxic, Irritant or Harmful Substances

Another possible reason for worms attempting to escape is the presence of harmful substances in the compost bin or worm farm. Worms can sense toxins in their environment and will move away from harmful chemicals. Common culprits include:

  • Anaerobic Conditions: In anaerobic (oxygen-depleted) conditions, microorganisms that thrive without oxygen can produce harmful by-products such as ammonia (NH3), methane (CH₄), and hydrogen sulfide (H2S), which are toxic to worms. These chemicals can irritate the worms’ sensitive skin and disrupt their respiratory process, prompting them to escape in search of more oxygenated environments.
  • Excessive Salt: The reason why food waste high in salt should not be used in compost bins or worm farms is that the salt draws water out of its surrounding environment by osmosis, and will do the same to compost or soil bacteria, desiccating and killing them. It also can cause osmotic stress in worms, as the salt draws moisture out of their bodies, which can cause dehydration and eventual death.
  • Chemical Contaminants: Pesticides, herbicides, or chemical fertilizers present in the composting material can be toxic to worms. Many of these substances can cause symptoms like immobility, rigidity, reduced growth, and reproductive issues. Pesticides can cause physical damage, disrupt physiological processes, and reduce earthworm populations, or even kill them.

In conclusion, when worms gather at the top of a compost bin or worm farm, this behavior can be triggered by both natural environmental factors and unfavorable compost conditions. While their sensitivity to barometric pressure is a survival instinct to avoid drowning during rainfall, their escape attempts can also indicate chemical imbalances, temperature extremes, anaerobic conditions, or the presence of toxins in the compost. Monitoring and maintaining optimal conditions within the compost bin can help reduce these behaviors and ensure the health and vitality of the worm population.

For more information about what materials can and cant be put into compost and worm farms, please see the articles – What Materials Can You Put Into Your Compost Bin and What Not to Compost and The Complete Guide to Worm Farming, Vermicomposting Made Easy.

References

7 thoughts on “Why Do Earthworms Gather at the Top of Compost Bins or Worm Farms and Try to Escape?

  1. I know of a research paper written for the uni I went to in Swansea. It is all about worms and how they have a preference for previously burnt soil. Not sure if that was why the research was started, but that was the result. To me it didn’t make sense, as other papers have said fire decreases soil nutrients. Anyways, there’s that.

    1. Hi and thanks for your comment which got me thinking!

      If I go back to my chemistry background, when plant materials are burnt, many plant nutrients are lost, especially nitrogen (N) and organic carbon (C), as well as phosphorus (P) and sulfur (S) to a lesser degree. Wood ash is mainly comprised of calcium (Ca), potassium (K), magnesium (Mg), silicon (Si) and phosphorus (P), so these nutrients remain in greater concentrations. Wood ash leachate contained around 92% hydroxide and 8% carbonate, and when this is combined with the base-forming calcium and magnesium cations, these create basic (alkaline) compounds which increase soil pH. Calcium carbonate, which is garden lime, is usually formed, increasing alkalinity and altering the availability of nutrients. Some nutrients are converted to forms which are more water soluble and tend to leach away, being lost that way. A lot happens when plants burn!

      After a fire, there are less of some nutrients, while others become more concentrated, and here in Australia where we are prone to cyclical bushfires, we see that many plants and trees have adapted to fire, and their seeds germinate when exposed to heat or smoke, after which they spring up to take advantage of the nutrients released from plant materials by the fire.

      I’m not sure what would be left for worms unless the fires are mild, as they eat decomposing organic matter, which gets burnt off in fierce bushfires. I’m guessing in cooler climates, where soil profiles are deeper, the organic matter deeper down survives unscathed.

      1. You know, when the lockdown here in Wales has ended, I’ll pop up to uni and take a proper look at the research paper.

  2. Ive been working towards owning a farm for years. But i only recently discovered permaculture. I fell in love with the idea of working with nature instead of against it. Im been resigning my farm to function with diversity, no till gardening, annuals, self seeding plants, native plants. Thats what I remember of the top of my head.

    But Im finding many of my searches turn up dry. They give me the principles of permaculture, but no real answers. For instance, I understand the fruit tree guild, but are there fruit trees, any trees, that shouldnt be close to each other? Can carrots, onion, garlic, put under trees be protected from winter with natural leaf fall during autumn? … or must I cover them with hay and mulch? Can anything other then Timothy Hay be dried and used for winter fodder?

    I forgot to mention. Im honestly considering just seeding EVERYTHING when I get on my property. I mean that literally. What if I just tossed the seeds everywhere? Put up a good perimeter fence to keep animals on the farm. Fence my animals OUT of the controlled garden, instead of inside pastures? How bad could it turn out? I cant see how I could possibly be working with nature more then that.
    Any opinions on such a plan.

    These are questions that Im not finding answers for. Anyone help?

  3. My raised bed is mostly in plastic bins. After a medical crisis and several years of neglect, it was overrun with demon weeds. Endless winding, thick, nameless weeds I’m still digging out. Have I ruined my soil putting it in covered bins?! I planned on using worm castings, Azomite, and compost, but after reading this, I’m wondering what else I need to do before putting the soil back into the raised bed?

Leave a Reply