Stan Lee isn't casting himself in these cameos - it's a tradition which started back in 1989 with one of the original TV Hulk spin-off movies, one that has endured ever since.
From The Trial of the Incredible Hulk - 1989
He may have a producer credit on the Marvel movies, but his involvement doesn't go any deeper than just being a beloved figurehead - these cameos are homages by the filmmakers.
A comprehensive list of his cameo appearances, plus images, can be found here.
Quoting Lee himself:
"It’s almost scary ‘cause they just give me a date. They’ll say, "Stan, come over next Thursday for your cameo," but they don’t tell me what it is. So, I show up and they say, "Go to wardrobe." In wardrobe, they say, "We want to get you a white shirt and a green sweater and a black zippered jacket," and I’ll say, "Don’t bother, I’m wearing one." And then, they say, "But, you can’t wear yours!," and they look around and get me the exact same thing, but I’m not allowed to wear my own. And I still don’t know what my role will be. I go on the set and one minute before we’re gonna shoot, the director says, "Okay, Stan, this is what I want you to do. So, I don’t know what is expected of me, until I get there, but of course, I do it magnificently."
Unconfirmed reports suggest that he will be a beauty contest Judge in Iron Man 3 and a London bus driver in Thor: The Dark World.