Sleeping with the blinds open at night puts people in increased danger of suffering a stroke or heart attack, a study has shown.