Mushrooms can grow in potting soil when the conditions are favorable for their growth. This typically occurs when the soil is rich in organic matter and is kept moist for extended periods. Mushrooms thrive in damp, dark environments with plenty of nutrients, which can be found in potting soil that is not properly ventilated or drained.