RK Narayan on the naming of Malgudi, from interviews with N Ram and Susan Ram, Frontline:

I had an idea of a railway station, a very small railway station. You’ve seen the kind of thing, with a platform and trees and a station-master. The railway station to which Swami goes to watch the trains arrive and depart: that was the original idea with which I started Swami and Friends. But in the actual book it comes last, it’s at the end of the story.
And then what happened was I was thinking of a name for the railway station. It should have a name-board. And I didn’t want to have an actual name which could be found in a railway time-table. I wanted to avoid that, because some busybody was likely to say, “This place is not there, that shop he has mentioned is not there.” If it’s a real town it’s a nuisance for a writer.
And while I was worrying about this problem, the idea came to me – Malgudi just seemed to hurl into view. It has no meaning. There is a place called Lalgudi near Trichy and a place called Mangudi near Kumbakonam or somewhere. But Malgudi is nowhere. So that was very helpful. It satisfied my requirement.

(RK Narayan, born on 10th October, 1906)