I’ve never tried swimming to shore in quicksand. I think you’re right about lying back. Don’t panic. Don’t kick. Don’t raise your arms out of the quicksand. Keep you hands in the quicksand, and sweep them back and forth to propel yourself toward shore. Hopefully, you be able to touch solid ground, and crawl to shore.
It wasn’t me!