Six to eight hours sleep a night is most beneficial for the heart, researchers have suggested.
More or less could increase the risk of coronary artery disease or a stroke, according to the findings of a new study.
The research, presented at the European Society of Cardiology Congress in Munich, Germany, suggests sleep deprivation and excessive hours in bed should be avoided for optimum heart health.
Study author Dr Epameinondas Fountas, of the Onassis Cardiac Surgery Centre in Athens, Greece, said: "Our findings suggest that too much or too little sleep may be bad for the heart.
"More research is needed to clarify exactly why, but we do know that sleep influences biological processes like glucose metabolism, blood pressure, and inflammations - all of which have an impact on cardiovascular disease."
Data from more than one million adults from 11 studies was analysed as part of the research.
Those who slept for less than six hours per night or more than eight hours were at an increased risk of developing or dying from coronary artery disease or a stroke, according to the study.
Compared to adults who got six to eight hours of shut-eye a night, "short sleepers" had an 11 per cent greater risk while "long sleepers" had 33 per cent increased risk over the next nine years, the researchers said.
Dr Fountas added: "Having the odd short night or lie-in is unlikely to be detrimental to health, but evidence is accumulating that prolonged nightly sleep deprivation or excessive sleeping should be avoided."
Emily McGrath, senior cardiac nurse at the British Heart Foundation, said: "Getting a good night's sleep is important for good health.
"When it comes to our heart and circulatory health, this large study suggests that there may be a sweet spot between getting too much, and getting too little sleep.
"This research needn't trigger alarm bells for those of us partial to a sleepless night or a weekend lie-in.
"However, if you regularly struggle with your sleep, it's an important reminder to speak to your GP.
"As well as having a negative impact on your quality of life, a lack of sleep could also be contributing to heart health problems further down the line."