General synonyms:
* Twisting
* Squirming
* Thrashing
* Contorting
* Groaning (if in pain)
* Struggling
* Agitating
* Convulsing (for more severe movements)
Synonyms emphasizing discomfort or pain:
* Wincing
* Grimacing
* Cringing
* Hunching
* Shuddering
Synonyms emphasizing movement:
* Slithering
* Coiling
* Gyrating
* Swaying
* Bucking
Synonyms emphasizing emotional distress:
* Tussling (with emotions)
* Toiling (with inner turmoil)
* Brooding (if internalized)
* Agonizing (over a decision)
The best synonym for "writhing" will depend on the specific situation and the intended meaning.