Thanks for the comment!
The sand movement is actually simple: Vertices that are lowered by the Player become hungry for heights. Then they keep stealing heights from nearby, higher vertices until they become satisfied.