•Daytime napping was independently associated with a 30% increase in diabetes risk.•The association was partly explained by adiposity.•Short and long sleep was associated with a 46% and 64% increase in diabetes risk.•The risk of diabetes more than doubled for those taking day naps and sleep for