Since it isn't really a 100% of the time kind of a deal, I think Dave Nelson has nailed it on the head. My daughter picked up a french accent for awhile at about the same age (after seeing Rattatouille) and I mysteriously developed a southern drawl when I was three as well. My parents talk about me getting dressed up and using the accent when I was wearing a certain dress and hat.
As Karl Bielefeldt points out, he is experimenting with and discovering a new part of language he hadn't previously connected with. What is funny, is that now, since my daughter is an actress, we encourage it and age seven she has a pretty good standard British accent and can immate a Texan drawl quite well as well. She is also attempting an Italian accent and has mentioned desiring learning an Irish accent as well.
Have some fun with it. Perhaps when he is using his accent, call him "mater" (or wherever he picked up the idea) and call him by his name when he isn't using it. Maybe you could even try on an accent or two. See if he'll use his funny voice when "reading" a character from a favorite story he has memorized - you get the idea. I wouldn't worry about it unless he starts refusing to speak any other way.