Transcranial electrical stimulation (tES) is a non-invasive neuromodulation technique characterized by high safety and minimal side effects, and has been widely applied in the treatment of insomnia and its accompanying symptoms. tES can be divided into transcranial direct current stimulation and transcranial alternating current stimulation. This article explores the mechanism of action of tES for insomnia, reviews the current research status and progress of tES for insomnia in recent years, and proposes potential future research directions.