Defenseman Alec Martinez has agreed to a two-year contract with the Los Angeles Kings, avoiding an arbitration hearing.