Mushroom growers will say that all you need is a dark room to grow mushrooms, but temperature and humidity play the main role in whether mushrooms will put forth a fruiting body. Compost that is not finished will certainly produce too much heat for a button mushroom and will kill the mycelium.
Growing button mushrooms in compost requires that the compost be fully matured, having completed the high heat stage that commences into the cooling stage. Compost growing medium needs to have a temperature less than 80 degrees Fahrenheit and must be watered to maintain high moisture levels.
Knowing when to apply water to mushrooms and substrate is an art form and stages of growth are to be observed by the grower to achieve best production. Relative humidity is to be kept at 80 percent or higher and water will need to be applied to the substrate to prevent it from drying out. Fruiting bodies require higher levels of moisture to put forth fully formed mushroom caps.
Spawning and mycelial growth requires temperatures between 74 and 77 degrees Fahrenheit. Pinning and full mushroom development begin when the temperatures drop to between 60 and 66 degrees Fahrenheit.