They look like... well... crabs taht aren't moving...
Yeah, what you saw sounds like a molt. They hide when they're molting and after, its when they're most vulnerable.
I wouldn't worry picking out the legs, either. If you have a CUC, something will eat them.