what happens to calcium ions in the muscles after death
Certain types of muscle cells are activated by calcium ions. After activation, the cells expend energy putting the calcium ions back outside the cell. After death, the membranes become more permeable to calcium and the cells don't expend as much energy to push the ions out, so the muscles contract. This does lead to rigor mortis and can lead to ejaculation. It's real. It happens.