Almost 80,000 years before humans began using chemical sprays to control insect pests, Africans were using mattresses made from bug-repelling plants to ensure a good night's sleep.
The finding, published in the journal Science on Friday, derives from 77,000-year-old plant bedding found in a cave in South Africa's KwaZulu Natal province.
The find is 50,000 years older than any previous prehistoric beds discovered.
The bed's insect-repelling capabilities suggest ancient humans were well aware of the chemical and medicinal properties of some plants.
"The leaves contained chemicals that repelled mosquitoes and other insects, so we know that they understood medicinal plants," said Lyn Wadley, an archaeology professor at the University of the Witwatersrand.
The bedding would have helped reduce insect-borne disease, although early humans would not have made any connection between mosquitoes and malaria, she told Reuters.
"It was for comfort. They would have known that those leaves kept away insects and maybe other pests as well," Wadley said.
The bedding consists of thick layers of compacted stems and leaves of sedges and rushes collected from the banks of a nearby river.
In the last few years, scientists have made a series of startling discoveries in South Africa shedding light on the lives of early humans.
In October, researchers at the Blombos Cave 300 km (200 miles) east of Cape Town discovered a 100,000 year-old painting kit consisting of abalone shells, color pigments and bone spatulas used to work up a paste.