Wilson plays Gil, a man who finds new adventures while wandering the French capital, in Allen's latest romantic comedy - but the director admits the funnyman wasn't exactly what he originally had in mind for his leading man.
So Allen decided to rework his script to give Wilson a more laid-back role.
He tells the Hollywood Reporter, "The lead was a more East Coast character in the original script. (Casting director) Juliet Taylor suggested Owen Wilson.
"I had always been a fan of his, but always felt that he has a very West Coast persona. He belongs very much at home on a beach or with a surfboard. So I rewrote the script, making the character a West Coast character. I sent it to Owen and I was very lucky he wanted to do it.
"(Rewriting) does happen, and I’m happy to do it if I can get an actor like Owen, who is a strong person to play something. Then I am perfectly willing to rewrite a character if I can rewrite it. Of course, there are some characters that you could never change. That would ruin the story. But very often you can adjust a character. If you have a strong personality, sometimes it requires an adjustment."
Midnight In Paris is to debut at the Cannes Film Festival in France on Wednesday (11May11).