Researchers tracked the health and lifestyle choices of nearly 290,000 adults over the course of nearly 10 years.
See also: How the weather affects your risk of having a stroke
People who sleep for seven to eight hours a night were 25% less likely to have a stroke.
See also: Does working long hours affect your risk of stroke?
If they also exercise for 30 minutes three to six times a week, the risk was even lower.
On the other hand, getting fewer than seven hours a night increased the risk of stroke by 22%.
More than eight hours was also linked to to an increased risk. In fact, longer sleepers had an increased risk of 146%.
According to the Stroke Association, most strokes are preventable. It says: "Although you cannot change some of the things that increase your risk of stroke, like your age, there are others that you can change."