Drowsy driving detection is crucial for avoiding serious traffic accidents. Changes in sleep conditions affect the autonomic nervous system (ANS) and, subsequently, heart rate variability (HRV), which is fluctuation in the R-R interval (RRI) in an electrocardiogram (ECG). HRV is easy to measure with a wearable sensor, and it may be possible to use HRV to detect drowsy driving. In conventional HRV-based drowsy driving detection methods, some HRV features are extracted from RRI data for analysis, but it may result in the loss of time-series characteristics of the RRI data. This study proposes a new driver drowsiness detection method that can detect abnormal changes in the RRI data caused by drowsiness. The proposed method employs a self-attention autoencoder (SA-AE), which is a type of neural network that can utilize time series characteristics. An experiment with a driving simulator was performed to evaluate the drowsiness detection performance of the proposed method. In this experiment, RRI data were collected from 20 participants (nonprofessional drivers) while driving, whose sleep conditions were scored by a sleep specialist based on electroencephalography (EEG) data. The experimental result showed that the proposed RRI-based drowsiness detection method detected 16 out of 18 sleep-related events while driving (sensitivity of 88 %), and a false-positive rate of 0.60 times per hour was achieved. In addition, we validated the proposed method employing 18 middleaged professional drivers. The proposed drowsiness detection method would contribute to preventing accidents caused by drowsy driving in the future.