Sand is the mortal enemy of carpet. Capt Jerry is correct. You should probably repeat the process a few times. You might get lucky and have the carpet not be too damaged.
If it does stand back up, you might try pulling it through a coin operated carwash and blast it hard with soap and rinse and then vacuum out as much water as you can every time you take it out.
I clean carpets, tile, upholstery, and more. (Boats, RVs, etc)www.stephenbclean.com