Remove the sand immediately. It is both dangerous (impaction) and VERY dirty/unsanitary. Put him on paper towels or ceramic tiles...Beardies DONOT live on loose sand in the wild, they live on hard packed dirt, sand, and clay. The sand that they sell in petstore are very unsafe...would you like to live in a kitty litter box? and be forced to eat in it too...
Give him a Good long soak in very warm water 90F for at least 30 minutes, he's probably dehydrated from not eating. After you've soaked him let him warm up on a basking spot for 15-20 minutes, and then offer him some greens. If he doesn't start eating I would get him to a herp vet...