Mushrooms don't have to be attached to rocks to thrive. Often this is how they move about, they detatch and let the currents carry them to their next destination. However if you'd like to attach it back onto the rock you can lightly strap it to the rock with a string or elastic band. Be careful that it isn't too tight over the mushroom or the mushroom will just split around the elastic band or grow into it. It should attach to the rock in a few days