A new study has shed light on exactly how a lack of sleep causes harm