May have been starvation coupled with stress... frozen Bloodworms are small enough for specimens of that size, but even trout worms may be too large... TONS and TONS of sand is best for this species, it is happiest when you never see it, they love living in the sand, poking their heads out like garden eels, waiting for food.
Bonus: dropping in the bloodworms make the eel IMMEDIATELY leave the sand and go NUTS!
What kind of cichlids were you housing it with? I have Juruparis and they leave my peacock alone.