Children may inherit the urge to exercise, but their environment often stops them from doing so, say Cancer Research UK researchers.
In a study of over 100 pairs of twins, the authors found that most of the variation in how fidgety the twins were and whether they enjoyed exercise is influenced by differences in their genes.
But the amount of exercise children actually get is mainly influenced by their family, neighbourhood or school environment.
Professor Jane Wardle, from Cancer Research UK's Health Behaviour Research Centre based at University College London, said: "This research shows us how important it is to encourage exercise in schools and at home.
"Some children may inherit versions of different genes that make them naturally more likely to enjoy sports and exercise. But their environment is the most powerful factor in determining how active they actually are."
When the researchers found differences in how active twins were, they discovered that 73 per cent of this variation was down to their environment.
In contrast, over 75 per cent of the variation in fidgetiness and their urge to exercise could be explained by genetics.
Around 17 percent of boys and 16 percent of girls in the UK aged two to 15 are obese.
Being overweight or obese is linked to a number of cancers, including breast and bowel cancer.
Sarah Woolnough, head of policy at Cancer Research UK, said: "Research like this is crucial if we are to help tackle our high levels of obesity across the UK.
"It supports the need to encourage physical activity in schools and in the community to help young people to get more exercise.
"It is estimated that more than 19,000 cases of cancer could be prevented each year in the UK if everyone maintained a healthy bodyweight. Along with a balanced diet, it's important that healthy activity habits are encouraged at a young age, as they could make a big difference to cancer risk in later life."