Sobolev periodic solutions for nonlinear wave equations in higher dimension