The story goes that I first had the idea for The Hitch-Hiker's Guide to the Galaxy while lying drunk in a field in Innsbruck (or 'Spain' as the BBC TV publicity department authoritatively has it, probably because it's easier to spell).
Apparently I was hitch-hiking around Europe at the time, and had a copy of The Hitch-Hiker's Guide to Europe ... with me at the time. I didn't have Europe On (as it was then) Five Dollars A Day because I simply wasn't in that kind of financial league.
My condition was brought on not so much by having had too much to drink, as much as having had a bit to drink and nothing to eat for two days. So as I lay there in this field, the stars spun lazily around my head, and just before I nodded off, it occurred to me that someone ought to write a Hitch-Hiker's Guide to the Galaxy as well.
... However, I wouldn't like to create the impression that all a writer has to do is sit in a field cramming himself with a couple of Stella Artoises whereupon a passing idea will instantly pounce on him, and then it's all over the bar typing. An idea is only an idea.
An actual script, on the other hand, is hundreds of ideas bashed around, screwed up, thrown into the bin, fished out of the bin an hour later and folded up into thick wads and put under the leg of the table to stop it wobbling. And then the same again for the next line, and the next, and so on, until you have a whole page or the table finally keels over.
The problem is you can't go and rave it up in a field every time you need an idea, so you just have to sit there and think of the little bastards. And if you can't think of them you just have to sit there. Or think of an excuse for doing something else. That's quite easy. I'm very good at thinking of reasons for suddenly having a quick bath or a Bovril sandwich. Which is why truthful explanations of how writers get ideas tend to be rather dull:
I sat and stared out of the window for a while, trying to think of a good name for a character. I told myself that, as a reward, I would let myself go and make a Bovril sandwich once I'd thought of it.... Reading through what I've written so far, I feel I must correct the impression that it's all done with sandwiches, because there's also a lot of playing the guitar very loudly involved as well.
I stared out of the window some more and thought that probably what I really needed to help get the creative juices going was to have a Bovril sandwich now, which presented me with a problem that I could only successfully resolve by thinking it over in the bath.
An hour, a bath, three Bovril sandwiches, another bath and a cup of coffee later, I realized that I still hadn't thought of a good name for a character, and decided that I would try calling him Zaphod Beeblebrox and see if that worked.
I sat and stared out of the window for a while, trying to think of something for him to say ...