Different species of clams, though quite similar in overall appearance, require different substrates on which to rest. In nature, these substrates can range from sandy bottoms to hard calcium carbonate structures (e.g. live rock). You may not know what species of clam you have, but determining the ideal location for it is relatively easy. The proper substrate to be used can be determined by looking at the bottom of the clam. If the opening where the two shells meet, called the byssal opening, is large in relation to the clam’s size, then the clam is better suited for hard surfaces like live rock. These clams include Tridacna crocea and T. maxima. If the byssal opening is small, it is more natural for the clam to sit on sandy substrates. These include T. gigas, T. derasa, and T. squamosa for example.
All this being said, it won’t kill your Maxima clam if it sits in the sand. In fact, I’ve housed plenty of Maxima clams in the sand before, simply because I had an overabundance of clams and a lack of real estate. To solve the little substrate issue though, I would bury a flat rock under the sand and put the clam on top of it. Eventually the clam would attach to rock with its foot and byssal threads.