When using sand in conjunction with heat mats its best not to have the sand to deep if the sand is to deep you can get thermal blocking and incorrect temperature readings.
Don't have the sand any deeper than 1" and bury your thermometer / thermostat probes slightly directly above the heat mat.
Try to secure them into position so your leopard gecko cant move them out of place.
If you want the substrate to be deeper then i would suggest using a bulb instead of a heat mat for providing heat.
Obviously you will need a fairly large vivarium when using a basking bulb so that you are still able to provide a thermal gradient and prevent over heating.