Most people harbour the hope that when their time is up, they will die peacefully in their sleep.

But dying in your sleep may not be as peaceful an experience as is popularly supposed, new research suggests.

Scientists believe death occurring during sleep often happens because a person stops breathing.

When elderly but otherwise healthy people die suddenly during sleep, doctors usually put it down to heart failure.

However, tests on rats suggest a different cause. Death is more likely to be due to the failure of a breathing ''command centre'' in the brain.

Researchers focused on a brainstem region called the preBotzinger complex (preBotC) which contains specialised neurons that trigger breathing.

Rats were injected with a chemical designed to target and kill more than half the preBotC neurons.

The results were dramatic. Breathing stopped completely when the rats entered REM sleep - the mentally active phase of sleep characterised by dreaming - forcing the animals to wake up.

Over time, the breathing lapses increased in severity and spread into non-REM, deeper sleep. Eventually they occurred when the rats were awake as well.

The US scientists believe the findings, reported in the online edition of the journal Nature Neuroscience, are relevant to humans.

Mammalian brains are all organised in a similar fashion. Rats have about 600 of the specialised preBotC cells, and humans are thought to have a few thousand.

The cells are lost as part of the ageing process, and not renewed.

Dr Jack Feldman, who led the team from the University of California at Los Angeles, said: ''We speculate that our brains can compensate for up to a 60 per cent loss of preBotC cells, but the cumulative deficit of these brain cells eventually disrupts our breathing during sleep.''

The scientists believe loss of preBotC neurons causes elderly people whose lungs and heart are already weakened due to age to stop breathing and die.

People suffering from the late stages of neurodegenerative disorders such as Parkinson's and Lou Gehrig's disease may also be at risk.

Many of these patients have breathing difficulties during sleep, although they breathe normally while awake