Synchronization is one of the paradigmatic examples of emergence of collective behaviors in populations of oscillating units, depending not only on the type of individual dynamics but on the pattern of interactions. In nature there are many examples of synchronization where the connections between the units are not fixed in time. Here we present a model of synchronization of oscillators that move on a 2-d plane interacting only with other oscillators that are within a finite range. This makes that the network of interactions changes in time. We show that there exists an optimal regime where both fast synchronization and high efficiency are achieved. We propose an analytical framework based on the set of linearized equations with time dependent interactions that can be applied to any type of agent motion and oscillator dynamics. This approach enables to estimate the asymptotic behaviors of the system.