Researchers say it does not matter whether the child is playing a sport or just reading a book.
Experts have yet to determine why being outside is protective, but they believe a likely candidate is the high levels of light experience outside compared to inside.
The study looked at more than 1,700 6 year olds and more than 2,300 12 year olds.