You stressed it out by messing with sand and making the water cloudy.
I also found that out the hard way.
If it lives, it will hide out and not move for quite awhile. With mine, after a couple of days, I wrapped some nori around a rock and placed it right next to it. Eventually, it started to eat.
If it lives, it will take several weeks for the spines to grow back to normal length.
Don't mess with it or the sand. For the next several days. Hopefully, it will recover by itself.
Best of luck,
Roy