(And first off, those studies miss something very important -- I don't need caffeine to come up with ideas. Ideas, both good and bad, come to me on their own. I compose things in my head. What caffeine does is help put me in the mindset to actually type out the bullshit I come up with. Anyhow.)
But really, what works best for me in writing is coffee shops. And drinking coffee just helps me bring a little bit of that home (like using the presence of one Lair trait to invoke others in Beast: The Primordial). A lot of the things that help me write can be found in coffee shops.
First off, I need an environment where people are going to be encouraged to sit around and take up space. Not all coffee shops do this well, but the ones that tend to survive do. Bonus points if the hours are late or there's an outdoor area where the employees don't mind if I sit outside when the place is closed.
Second, I need something with a certain degree of background noise. Even if I'm listening to music, having other people milling about in the background or being aware that music over a speaker is being drowned out helps. It helps me focus, to tune that out.
(If there are other people there, that helps even more. Because it helps set the mood that this is a place where Writing Happens.)
Third, I need to be away from my house, where I can grab books at whim and fiddle with them, or 'take two minutes to mess with something in another window' and then spend half an hour talking to someone in a messenger. (Admittedly, modern tablets aren't helping this much, but they do help me access materials I actually need for some of my writing so that much is a draw.)
And as a bonus extra, access to food, drink, and restrooms is a plus.
Coffee shops are ideal for me in this regard. A bar or a university student center can serve as an imperfect substitute. Student Centers tend to be a little too bright and sterile for my tastes. Bars can be too loud, and as I'm not a drinking man I feel awkward just drinking soda (even moreso when the bartender just gives it to me without charging) or spending an hour and a half nursing a single beer. Also, if you stay too late in bars, you run a risk of having drunk randos wanting to know what you're doing, or thinking they can give you suggestions and help. (Personal experience tells me that ideally, the cutoff time before this starts being an issue is about 1am. I don't think I've ever had a drunk rando problem earlier than then.)
Anyhow, this has been a glimpse into my writing process. Good day.