Most (but not all) nems would rather have their foot firmly attached to a solid surface and nut just sit in the sand. Now many will LOOK like they are in the sand, but 1-4" down under the sand there is a hard surface they are attached to. If anything bothers them, they can retract under the sand and disappear. So here is a suggestion. Take a small bowl of tank water that is deep enough to cover the nem. Then get a PVC end cap and set it in the bowl with the open side facing up. Get one big enough so the nems foot fits in but not so big that it has a lot of room to move (they come in 1/2" to 3" or more). Place the nem in the end cap. Now let it be and 2 or 3 times a day, like early morning and before you go to bed, dump most of the water in the bowl and fill it with more water from the tank. After 2 or 3 days the nem will very likely have settled down into the end cap and be attached. Then you can take the nem and the end cap and push the cap down into the sand where you want it. It's OK if sand goes in the end cap. If your nem is ever going to be 'comfortable' in the sand, this should do it. If it moves out and onto the rocks, then it doesn't want anything to do with being in the sand.
I've done this with RFAs, RBTAs, Curly-Qs, Condys and mini maxis and they all seem fine with it. Once in a great while one will move, but it's been very rare. Good luck. Ask questions if you have any.