I have a notebook.
A serious notebook. Leather bound and all that. It lives propped against the walk next to my bed.
And in it I have an astronomer's pen. It has a tiny red light it. Just enough to write a few notes.
It protects me in part from the Hazards to Sleep of Writing Non Fiction. My sense is that it would be good for about 50 or 100 words and beyond that I would still feel drawn to a computer.
That said, it has never actually failed me, except when I forget to set it up the night before.
Unfortunately, such forgetting is just part of the hazards.