Middle-aged men working in offices spend more time sitting down than pensioners, with large parts of the population "dangerously sedentary", new research has found.

The Edinburgh University study found men aged 45-54 spend on average 7.8 hours each weekday sitting down. Men aged over 75 spend 7.4 hours each weekday sitting.

Sedentary work is the main reason for the inactivity, with sedentary time (ST) defined as time spent in any waking activity done while sitting or reclining, including working, eating, reading, watching TV or being on a computer.

Women in all age groups spend less time sitting than the over-75s.

Experts are demanding action to tackle high levels of ST, which has been linked to cardiovascular disease and type 2 diabetes among other diseases.

Among men, only the youngest group surveyed - 16 to 24-year-olds - are significantly less sedentary than the over-75s on weekdays, spending 6.6 hours a day sitting down.

At the weekend, the weekday situation reverses for both men and women. Those aged 25 to 54 were the least sedentary, sitting for between 5.2 and 5.7 hours a day, while the over-75s were the most sedentary, at 7.3 to 7.4 hours a day.

For the youngest group, most of the time sitting down is in front of a TV or screen. Men spend less time in front of a screen as they get older, with women peaking in middle-age.

Experts say high levels of sedentary time - more than seven hours a day - increases the risk of an early death, cardiovascular disease, type 2 diabetes and some cancers, even if people are physically active at other times of the day.

Lead researcher Tessa Strain said: "Large parts of the population are dangerously sedentary, something we have underestimated.

"We need to tackle high levels of sedentary time in early and middle age, when patterns may develop.

"Our findings suggest that changing habits in the workplace could be an appropriate place to start, given how much time we spend sitting there every day."

A recent review by other researchers found "tentative evidence" to suggest sit-to-stand desks could reduce work sedentary time, at least in the short term.

The latest study calls for more research and also suggests initiatives to reduce the amount of time people spend in front of a TV or screen during leisure time.

The researchers said: "Our results challenge the conventional understanding that older adults in Scotland report the highest levels of ST, as the majority of middle-aged adults reported similar levels to older adults."

They added: "Based on these results, we recommend that ST at work amongst early-to-middle aged adults and leisure TV/ screen time for all adults are considered as targets for interventions to reduce ST."

The findings from the University of Edinburgh's Physical Activity for Health Research Centre were published in the Journal of Sports Sciences.

Researchers drew upon data from more than 14,000 people in Scotland in the 2012-14 Scottish Health Survey.