Thinking of ideas and paragraphs while walking or lying down is "writing", it's just doing the mental part of writing. Your fingers aren't physically tapping keys, but that doesn't mean you aren't writing.
When someone imagines a "writer", they picture them sitting in an old cottage with a rickety brown desk filled with crumpled up papers, whiskey, and cigarette ash. While this sounds like a picture perfect scene (minus the cigarettes), that's only part of what the writing process looks like.
Most writing occurs in a writer's head. This is where they put different ideas together in various ways, think of illustrations and stories to use, and substitute words for one another. They arrange the sentences and paragraphs in their mind as well.
What's interesting about this process is that it's usually not intentional. Someone doesn't go out to the grocery store thinking, "I'm going to finish writing this article while I'm out." Instead, they hear something on the radio, or see an interesting billboard and think about how it might be useful for whatever it is they're writing about.
If you're struggling to write, get away from your desk and out in the world. Most writing happens in your head.