Sand is part of being at the beach. It's in the air, the water, you shoes. Even your underwear (even if you don't sit on the sand, or go anywhere near it. This is still a mystery to me). But the point is, sand is to the beach, as leaves are to the forest floor. it's all around you.
If you can get to the beach, and don't mind getting dirty, sandy, and wet, it's one of the best places to be for growing locks.
Like Eagle said, just let it dry, then shake your head, and most of it will come out. When you wash, the rest will wash out. The bigger issue with the ocean is the salt water. When you get your locks soaked, don't just let them air dry, and go about the rest of the day. If you donk your head in the ocean, try and make sure you at least rinse your hair pretty well to get the excess salt out