Coffee grounds can improve soil composition and nutrient levels for up to three months. However, it is recommended to incorporate them into the soil so that beneficial microorganisms, like earthworms, can aid in efficient decomposition. After this period, most of the nutrients in the coffee grounds will have been converted into a valuable organic fertilizer for your cannabis plants.