Use super glue gel.
Just to let you know mushrooms have a mind of their own, even if they do attach to the sand, after you superglue them somewhere they will sometimes still move, but this method does work. You can try to jam them into a crack on your live rock. I have found that this works well too, you just need a nice crevice in the right spot...
Also your mushrooms want to be in a low light low flow area of the tank. So once I have the mushrooms where I want them, super glued or jammed into a crack, I adjust the flow of my tank to a bare minium for a day or two. The low flow encourages them to stay put. It might not the best thing for the tank but mushrooms moving after you have them where you want them is no fun. Good luck.