Scientists examined data from a cohort of 88,000 people who measured what time they went to sleep and have concluded the optimum time is between 10 and 10.59pm.
Those who went to bed before 10pm had a 24 per cent increased risk of later developing heart disease, while those who went to bed after midnight saw their risk increase by 25 per cent.
Participants in the study who fell asleep between 11 and 11.59pm had a 12 per cent greater risk.
One of the researchers, David Plans, from the University of Exeter, said: "The body has a 24-hour internal clock, called circadian rhythm, that helps regulate physical and mental functioning.
"While we cannot conclude causation from our study, the results suggest that early or late bedtimes may be more likely to disrupt the body clock, with adverse consequences for cardiovascular health."
Previous research has highlighted links between how long people sleep for and cardiovascular risks, but this is the first study to examine the time people fall asleep rather than the duration.
Over 88,000 people, recruited over a decade ago as part of a larger research project, wore a device on their wrists which measured when they went to sleep over seven days.
When the study’s authors followed up five years later, 3,172 of the participants (3.6 per cent of the total) had developed some kind of heart disease, which could include heart attacks, strokes, transient ischaemic attacks and heart failures.
Those who had gone to sleep between 10 and 11 were the least likely to have developed heart problems, the researchers discovered, even after controlling for other variables such as age, sex, duration of sleep, smoking status, body mass index, diabetes, blood pressure and socioeconomic status.
"Our study indicates that the optimum time to go to sleep is at a specific point in the body’s 24-hour cycle and deviations may be detrimental to health,” Dr Plans said.
"The riskiest time was after midnight, potentially because it may reduce the likelihood of seeing morning light, which resets the body clock."
However, all the data shows is a correlation between bedtime and heart disease and by itself is not enough to prove later or earlier bedtimes actually cause cardiovascular problems later in life.
When breaking the data down by sex, the association between heart disease and sleep onset was strongest in women, he added, noting for men there was only significant differences for those going to sleep before 10pm.
This could be down to differences in how the hormonal system works in men and women and how it responds to disruption to the body’s internal clock.
He concluded: "While the findings do not show causality, sleep timing has emerged as a potential cardiac risk factor - independent of other risk factors and sleep characteristics.
"If our findings are confirmed in other studies, sleep timing and basic sleep hygiene could be a low-cost public health target for lowering risk of heart disease."
Regina Giblin, senior cardiac nurse at the British Heart Foundation, said: "This large study suggests that going to sleep between 10 and 11pm could be the sweet spot for most people to keep their heart healthy long-term.
"However, it’s important to remember that this study can only show an association and can’t prove cause and effect.
"More research is needed into sleep timing and duration as a risk factor for heart and circulatory diseases.
"Getting enough sleep is important for our general wellbeing as well as our heart and circulatory health, and most adults should aim for seven to nine hours of sleep per night."
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies