Well if they are on a pc. of rock rubble already you can use super glue gel to glue the rock rubble where you want it.
If they are loose, they will attach to substrate where they are placed providing they are not blowing around the tank. Then you can super glue gel the substrate where you want it.