The muscles of a recently deceased human can remain in a contracted state, termed rigor mortis, for several hours. What prevents the muscles from relaxing soon after death
when the cells can't pump out the calcium out, it concentrates in the muscles forcing muscles to constrict and lastly waste away when the muscle proteins decompose