If you are about to spend the next few hours sitting down at a desk or in a car with no chance for any exercise, a pre-emptive cup of cocoa could be the best medicine to keep you healthy.

Spending hours in a sedentary position can lead to a decline in the function of your blood vessels, research has shown. But a study has now found that consuming food or drink rich in flavanols can protect against this decline, at least in men.

Flavanols are compounds found in foodstuffs including tea, berries, apples and cocoa. Studies suggest they have been linked with improvements in cardiovascular health.

Why Penguin bars can no longer be described as ‘chocolate’

Researchers from the University of Birmingham said that a 1 per cent reduction in “vascular function”, measured by analysing the elasticity of our arteries, has been linked with a 13 per cent increased risk of cardiovascular diseases such as strokes, heart disease and heart attacks.

They recruited 40 healthy young men, 20 who were physically fit and 20 who had low levels of fitness. They were asked to consume either a cocoa drink with high levels — more than 695mg — of flavanols or a cocoa drink with low levels of just 5.6mg of flavanols. They were then asked to sit still for two hours.

For the study, published in the the Journal of Physiology, the researchers analysed the elasticity of their arteries via a measurement called brachial flow-mediated dilatation (FMD). Their systolic and diastolic blood pressure was also measured, as was the level of oxygen in their leg muscles and the blood flow in their arteries.

Inflammation: what it does to your brain function — and how to fix it

After drinking the low-flavanol drink, both the high and low fitness groups experienced a decline in FMD levels, an increase in diastolic blood pressure and reduced blood flow in their arteries after the prolonged period of sitting.

“However, the research found that those groups who consumed the high-flavanol cocoa drink, again in both fitness groups, did not experience FMD declines in either of the arteries in their arms or legs.

“This is the first time flavanols have been shown to be effective at preventing sitting-induced vascular dysfunction, in young healthy men.”

The results also show that increased fitness does not offer total protection against the negative effects of spending long periods sitting down.

Dr Catarina Rendeiro of the University of Birmingham said: “Our research shows that consuming high-flavanol foods and drinks during periods spent sitting down is a good way to reduce some of the impact of inactivity on the vascular system.

15 easy ways to live longer (and four things you should stop now)

“Given how common sedentary lifestyles have become and the increased risk this can have to vascular health, using flavanol-rich food and drink, especially in combination with breaking up periods of inactivity by going for a short walk or standing up, could be a good way to enhance long-term health, no matter the individual’s fitness level.”

Alessio Daniele, a PhD student at Birmingham, added: “It is actually quite easy to add high flavanol foods to your diet. There are cocoa products available in supermarkets and health stores, which are processed through methods that preserve flavanol levels.

“If cocoa isn’t your thing, fruits like apples, plums and berries, nuts, and black and green tea are all common kitchen staples and are readily available.”