Olivia Wilde and Jason Sudeikis have been granted a temporary restraining order against an alleged stalker.