I am not sure how they know what is under the sand, but yellow head (pearly) jawfish almost always have a flat stone, with the opening and burrow tunneling down, ending in a chamber under the stone as the roof. I have collected jawfish for years and I find the hole, put my net over it, dig around until I find the rock under the sand, then dig behind the rock to the burrow, chasing the fish into my net. The reason I tell you this is because if you put 3 inches of sand and rubble in a back corner, about an inch under the pile put a medium sized flat stone, the jawfish will find it and build his burrow there.
Another thing to remember is that jawfish move a lot in the ocean, I've seen them go from the shallows to 80 feet depending on season. The reason I tell you this is jawfish also are jumpers and you have to have a good cover on your tank, even after the jawfish is established and has a burrow that he is in for several months, something in his mind triggers and he will start to move around the tank at night. You will notice areas of the tank dug up as he looks to move his burrow. Usually when he hits a corner he goes up and if the tank isn't covered out onto the floor.