This work focuses on discretizing a second-order linear wave equation using the implicit Euler scheme for time discretization and the spectral elements method for spatial discretization. We prove that optimal adaptivity can be achieved by combining adaptive time steps with adaptive spectral mesh. We introduce two sets of error indicators for time and space, respectively, and derive optimal estimates.