So I found this floating between two rocks in my tank . When I removed it, it was encased in some kind of gel. It is about an inch long. The second photo is of it laying on top of the glass.
The cocoon part must be wrong but it does appear to be something that's slowly rotting. There is a type of Bristleworm that creates a cocoon like that but it's not all hairy looking.
Still interesting.