 In gardens, coffee grounds may be used for composting or as a mulch as they are known to slowly release nitrogen into the soil.The dry coffee grounds contain significant amounts of potassium (11.7 g/kg), magnesium (1.9 g/kg), and phosphorus (1.8 g/kg).They are especially appreciated by worms and acid-loving plants such as blueberries, although due to acids being leached from the grounds while in use, they typically have a neutral pH.