The old wives' tale has it that a hot water bottle can relieve pain deep in the body - and now scientists have discovered why. A hot compress can physically shut down the normal pain response involved in stomach aches, period pain or colic.

"The heat doesn't just provide comfort and have a placebo effect - it actually deactivates the pain at a molecular level in much the same way as pharmaceutical painkillers," said Brian King, a senior lecturer in physiology at University College London, who led the research.

Dr King found that if heat of more than 40C (104F) is applied to the skin near where internal pain is felt, it switches on heat receptors at the site of injury. These in turn block the body's ability to detect pain. He will present his findings today at the annual meeting of the Physiological Society.

"Heat is recognised by a group of receptors called transient receptor potential channels," said Dr King. "One of them, TRP1, responds to heat at around 40C. It's known to be on the sensory nerves that supply the internal organs like the gut."

When someone feels pain in the gut, a separate mechanism is firing. Receptors called P2X3 have detected ATP, a chemical that pours out of cells when they are damaged. The heat response appears to shut these receptors down.

"You've got the heat receptor on one side and the ATP receptor on the other side that will recognise the pain. Both are present in our cells and yet, when you activate one, it switches off the other," said Dr King. "What appears to be something that can sense heat can help you get over visceral pain by switching off the pain mechanism."

The research was spurred on by a chance conversation Dr King had several years ago with colleagues about why hot water bottles seem to relieve pain.

Dr King hopes his discovery will lead to new pain-relief drugs that could reduce the need for opiates such as morphine.

He said: "The opiates have a broad spectrum of action, they're good when you really require pain relief, but it comes at a price. They are very harsh on the body so you only give them as a last resort. We were looking for something that would be less aggressive."

He added: "The problem with heat is that it can only provide temporary relief. The focus of future research will continue to be on the discovery and development of pain-relief drugs that will block P2X3 pain receptors. Our research adds to a body of work showing that P2X3 receptors are key to the development of drugs that will alleviate debilitating internal pain."