People who do not keep to regular bed and wake-up times have a higher risk of stroke and heart attack, research suggests.