I write fiction, and I write everything in longhand for this exact reason. It can be difficult start some days but once I do it’s easier to get into that “edge of sleep” state you describe, where the creative juices start flowing more freely. My handwriting is awful, but being able to quickly scribble out ideas and add margin notes is very useful. Writing longhand allows much better harmony between my brain and the page. There are no distractions on paper either!
One downside is that I have to then type all my writing up, but I use this time as an opportunity to do a first editing pass.
One downside is that I have to then type all my writing up, but I use this time as an opportunity to do a first editing pass.