Pulling Your Legs Up And Crawling Out
When you lie on your back, you can slowly pull your legs back up. Do this only one leg at a time. Do not try to wriggle out, you'll only sink in deeper by shaking the sand around you. Take one leg out and then the other. Once you do that, you can slowly crawl your way out of the pit. If you're really close to solid ground, you can just roll towards it.