This mystery and apparent contradiction of the laws of physics has been explained by a Cambridge mathematician and a Japanese physicist.
They describe in the journal Nature how friction plays a key role in this peculiar phenomenon.
Jerky rise
The trick works only if the egg is spun with the right force and if the friction between the table top and the egg is just right.
Under these conditions, the axis of the spinning egg moves in a series of jerks until it reaches the vertical.
The phenomenon appears to contradict the laws of gravity, as the centre of gravity of the egg actually moves upwards, but, say Keith Moffatt of Cambridge University, UK, and Yutaka Shimomura of Keio University, Yokohama, Japan, there is a mathematical explanation.
That explanation took six months of the pair's spare time to work out, and the equations cover two pages of the scientific journal.
What it boils down to is that when friction conditions are just right, some of the spinning energy of the egg is translated into a horizontal force which begins to move the egg towards the vertical.
'Amusing problem'
The trick does not work with a raw egg because the fluid inside it dissipates much of the spinning energy.
Dr Moffatt admits there is unlikely to be an application for this interesting piece of science.
"You never know with these things," he said.
"I just thought it was a nice, amusing problem, especially at Easter time, when people are rolling eggs, and that's really why we did it."