Yes it very well could be a sand impaction, though this doesn't mean it was the only issue.
Can you take the sand out and put in ceramic tile, paper towels, news paper, or non-stick shelf liner?
Please check out our caresheet
CLICK HERE for CARESHEETThere's tons of great info on the caresheet that has been compiled over years. Keep in mind that most books on bearded dragons and pet stores have very old information from when bearded dragons were first brought over here and are seriously outdated.
It would also be recommended to go through these husbandry questions. I know there are a lot, I've already marked out the ones that you answered. Our goal is to make your dragons have a long, happy, and healthy life.
0. How old is your dragon?
1. How large is your enclosure (tanks size in gallons or measurement Length x Depth x Height)?
2. What exact brand of UVB source do you have, if any? Is it a tube, coil, or Mercury Vapor?
3. How old is the UVB bulb?
4. How far is the UVB source from the basking spot?
5. How hot is the basking spot in ºF or ºC?
6. What temperature is the cool side?
7. How exactly is this temperature measured (sticker thermometer, digital thermometer with a probe, temp gun, other)?
8. If using a probe, it is placed flush against the basking spot?
9. What live feeders does your dragon get? How many are offered? How often are they offered per day / week?
10. What Calcium and/or Vitamin supplements do you use (brand name and product name please)?
11. How often do you dust with calcium or vitamin powder?
12. What exact greens, fruits, or veggies do you feed your dragon? Does he eat them at all?
13. Hydration. Do you mist your dragon, have a water bowl, or soak your dragon in a bath?
14. If you soak your dragon in a bath, how long do you soak for, how often, and what temperature water?
15. What type of substrate do you use (shelf liner, sand, walnut, tiles, newspaper, etc)? sand Extra question: What type of sand is it? Playground sand? Calcium sand?