Maybe this will help, from the manual:
To set the mirrors to fold automatically whenever you exit and lock Model S touch Controls > Mirrors > Mirror Auto Fold. The mirrors unfold automatically when you unlock Model S.
You can also set mirrors to fold automatically whenever you arrive at a specific location, which saves you from having to manually fold them each time you arrive at a frequented place. To set this up, stop at the location you want to save (or drive at less than 3 mph (5 km/h)), and fold the mirrors. Save Location appears briefly below the Fold Mirrors control. Touch again if you no longer want mirrors to automatically fold at the location.