This study aimed to investigate prolonged screen time and using electronic devices before sleep and their associated factors in elderly people in Shaanxi province of China. We conducted a cross-sectional study among 2647 elderly participants aged 60–88 years. Data were collected through questionnaires. Demographic characteristics, screen time, using electronic devices before sleep, health status, lifestyles, sleep quality, and other associated factors were investigated. Logistic regression analysis was used to analyze the relationship between the associated factors of screen time and using electronic devices before sleep. The crude odds ratio (cOR) and adjusted odds ratio (aOR) and their 95% confidence intervals (CI) were calculated. A total of 1784 subjects completed the questionnaire. There were 6.89% participants with prolonged screen time and 13.45% using electronic devices before sleep frequently. Prolonged screen time was associated with personal monthly income (aOR = 1.205, p = 0.001), number of household residents (aOR = 0.860, p = 0.010), rural residents (aOR = 0.617, p = 0.038), and regular drinkers (aOR = 2.889, p < 0.001). Using electronic devices before sleep was associated with being female (aOR = 0.657, p = 0.007), family monthly income (aOR = 0.866, p = 0.002), being an occasional drinker (aOR = 1.891, p = 0.005), and self-reported sleep quality (aOR = 1.593, p = 0.007). In conclusion, several factors related to screen time or using electronic devices before sleep were identified. Only being a drinker was a common associated factor for both screen time and using electronic devices before sleep.