In English, these two sentences may mean two different things (depends on context):
Drinking coffee at work helps me
Drinking coffee helps me at work
The first says that drinking coffee at work helps, while the latter just says it in general. The speaker may drink it at home before going to work, for example. It is less specific, but it may me the same as the first based on context. Are both the exact same in Polish?
It may be understood the first way, but only in the part where it overlaps with the second sentence. "W pracy" may indeed be "at my workplace", but it's generally "at work". And "work" may surely be something you do at home. So the second sentence is the one we're looking for. We don't know what kind of work is meant here, and we don't know how much earlier the subject drinks the coffee. And as it's not mentioned that I drink it at the workplace, I wouldn't accept the first sentence.