Sleep is one of the most important human physiological activities and plays an essential role in human health. Polysomnography (PSG) is the gold standard for measuring sleep quality and disorders, but it is time-consuming, labor-intensive, and prone to errors. Current research has confirmed the correlations between sleep and the respiratory/circulatory system. Electrocardiography (ECG) is convenient to perform, and ECG data are rich in breathing information. Therefore, sleep research based on ECG data has become popular. Currently, deep learning (DL) methods have achieved promising results on predictive health care tasks using ECG signals. Therefore, in this review, we systematically identify recent research studies and analyze them from the perspectives of data, model, and task. We discuss the shortcomings, summarize the findings, and highlight the potential opportunities. For sleep-related tasks, many ECG-based DL methods produce more accurate results than traditional approaches by combining multiple signal features and model structures. Methods that are more interpretable, scalable, and transferable will become ubiquitous in the daily practice of medicine and ambient-assisted-living applications. This paper is the first systematic review of ECG-based DL methods for sleep tasks.