Or at least near my sleep.
When I’m in the planning phase, the outlining phase, of a new book I’ve found a pretty darn reliable way to work on ideas. I snuggle in to go to sleep and then start musing.
Since I’m close to sleep, my mind wanders. Sometimes it wanders in a useful way and sometimes not so much. For instance, I often get side-tracked in imagining dialog or detailed descriptions of things. Since these are things that flow well when I’m writing, I have to firmly tell myself to leave it alone for now.
My mind wanders in a good way when I start asking myself questions and testing out the various answers. I ask what would motivate the character to change from a very long held insistence he’ll go nowhere near a place to an equally strong desire to go there? That’s a tricky one, but by letting my sleepy self inspect the ideas, I’m gradually getting a grip.
When I wake, I go to my outline and start adding some things and striking out other things. Of course, the “outline” for my next book bears no resemblance to the outline I’ll be using when I sit down and write. It’s a brainstorming document, not a road-map to the story.
This approach works very well for me. So many sticky problems have resolved for me on the cusp of sleep. Some people get their ideas in the shower, I get mine in the outskirts of dreamland.