I think they eat sand and mud, or least swallow it and somehow digest any edible bits that might be in it. I could be wrong, but that's what I've heard.
They also secrete what their bodies can't process, and this is called cast. Seeing cast is a good indicator that the acorn worm is nearby. I don't think they come out of their burrows very often.