Continuous insomnia was more common in patients with anti-CASPR2 encephalitis than with anti-LGI1 encephalitis. Here, CNTNAP2 is linked to insomnia.