Did I just watch a spider die?
Spiders do curl up their legs when they die. Since they do not have muscles for extending the legs at their joints, they control the haemolymph pressure in the legs by using the blood pressure spike from their heartbeat to extend their legs out or walk. And with no heartbeat (when the spiders cease to exist), they curl up upon death.

Source: http://www.informationsociety.co.uk/why-do-spiders-curl-up-when-they-die/