Just add salt and the magic begins!
I understand this happens because salt contains sodium ions which, when in contact with the cells, change the electrical potential within each cell. This change is the ‘signal’ for the muscles to contract. Energy is stored in the muscles in the form of ATP (Adenosine-5′-triphosphate) and the twitching stops when the ATP runs out.
Apparently this is more likely to happen with cold blooded animals (like frogs) because they do not take on rigor mortis as quickly as warm-blooded animals (chicken, for example).