Image copyright Wits University Image caption Elephants were studied in Chobe National Park, Botswana

Wild African elephants sleep for the shortest time of any mammal, according to a study.

Scientists tracked two elephants in Botswana to find out more about the animals' natural sleep patterns.

Elephants in zoos sleep for four to six hours a day, but in their natural surroundings the elephants rested for only two hours, mainly at night.

The elephants, both matriarchs of the herd, sometimes stayed awake for several days.

During this time, they travelled long distances, perhaps to escape lions or poachers.

They only went into rapid eye movement (REM, or dreaming sleep, at least in humans) every three or four days, when they slept lying down rather than on their feet.

You might also like:

The war on elephants

A way to lift an elephant's mood

How to put an elephant to sleep

Prof Paul Manger of the University of the Witwatersrand, South Africa, said this makes elephant sleep unique.

"Elephants are the shortest sleeping mammal - that seems to be related to their large body size," he told BBC News.

"It seems like elephants only dream every three to four days. Given the well-known memory of the elephant this calls into question theories associating REM sleep with memory consolidation."

Image copyright Wits University Image caption The elephants were fitted with collars containing gyroscopes

Elephants living in captivity have been widely studied.

To find out more about their sleeping habits in the wild, Prof Manger and his research team fitted the scientific equivalent of a fitness tracker under the skin of the animals' trunks.

The device was used to record when the elephants were sleeping, based on their trunk staying still for five minutes or more.

The two elephants were also fitted with a gyroscope to assess their sleeping position.

Both elephants were followed for five weeks, giving new insights into their natural sleep patterns.

"We had the idea that elephants should be the shortest sleeping mammal because they're the largest," said Prof Manger.

"Why this occurs, we're not really sure. Sleep is one of those really unusual mysteries of biology, that along with eating and reproduction, it's one of the biological imperatives. We must sleep to survive."

Dreaming sleep

Generally, smaller-bodied mammals sleep for longer than larger ones.

For example, sloths sleep for around 14 hours a day, while humans sleep for around 8 hours.

How elephants survive on so little sleep remains a mystery.

The researchers are planning follow-up studies on more elephants, including males.

They also want to find out more about REM sleep in elephants.

REM sleep is believed to be critical in laying down memories.

It is a type of sleep seen across the animal kingdom, in mammals and birds and even lizards.

Most mammals go into REM sleep every day.

Follow Helen on Twitter.