Are both okay:
The lights turned on by itself/themselves and woke me up!
No. It's either The light ... by itself ...
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
No.
It's either
The light ... by itself ...
OR
The lights ... by themselves ...
(I don't think you even need those by-phrases. You could leave them out, and the meaning would be the same.)
CJ