New research by a team at University of Queensland (UQ), led by muscle physiologist Dr Bradely Launikonis, found it was part of a protective mechanism stopping people from damaging themselves in the days following exercise.
In the world-first study, Dr Launikonis's team have mapped muscle fibres from thigh biopsies at three points in the exercise cycle.
"This is the first time this type of imaging has been done in human muscles, everything before that been done in mice and rats," Dr Launikonis said.
"It tells us human muscles are very adaptive and can protect themselves.
"It means to all of us when you damage your muscles, your muscles know."
The study saw participants carry out a series of heavy weight-bearing leg exercises.
The researchers found how calcium built in the body while it was exerting energy and later dissolved, allowing muscles to repair and cope with the next workout.
"What we find after exercise, normal levels of calcium increase to dangerously high levels," Dr Launikonis said.
"We could see the membrane structures in muscle change and start to accumulate or suck away calcium from inside the muscle. Basically quarantine it and hold it away.
"It's thanks to small cavities inside the muscle fibres where calcium accumulates – called vacuoles - that the damage high calcium levels would otherwise cause to vulnerable muscle is reduced."
"The soreness a person feels is the body saying it is fatigued, that the muscles are vulnerable and it's time to rest."
Dr Launikonis said vacuoles then disappeared until the next round of strenuous exercise occurred.
"Prior to this, no-one had any idea this mechanism was happening," he said.
The UQ team hoped its results would help better understand muscle wasting diseases like muscular dystrophy, however more research is needed.