A number of primates were studied, including the mongoose lemur
The ancestors of humans, apes and monkeys may have taken to the trees because of their small body size.
Scientists have long wondered why early primates inhabited forest canopies, given that climbing appears to consume more energy than walking.
US researchers studied primates climbing and walking on treadmills.
They say there was no difference in energy consumption for small primates, giving clues to how their ancestors entered the trees 65 million years ago.
Dr Jandy Hanna of Duke University, Durham, North Carolina, said the data suggested that the earliest primates were able to exploit a new environment without added cost if they remained small.
"The earliest primates differentiated from other mammals partly due to their exploitation of a new arboreal niche - that of the terminal branches of trees," she told BBC News.
Early primates, which would have been about the size of large rats, then underwent a number of evolutionary changes as they adapted to their new environment.
These changes included nails rather than claws and grasping hands and feet.
"The benefit/payoff of invading this new environment (and the appearance of these anatomical changes) was an insect- and fruit-rich environment," said Dr Hanna.
Professor Robin Crompton, of the Primate Evolution and Morphology group at the University of Liverpool, UK, said it had been observed in the wild that small animals such as the mouse lemur and dwarf bushbaby move in much the same manner on verticals as horizontals.
"For the first time, [the US researchers] show that for primates of up to 4kg or so, at least, the energetic efficiency of vertical motion increases very little with size, while previous work has shown that the efficiency of walking increases sharply," he said.
Full details of the study are published in the journal Science.