Herein, vibrational behavior of functionally graded (FG) smart piezoelectric sandwich plates with honeycomb core resting on viscoelastic foundation under the effect of 2D magnetic field is presented. By varying the magnetic-field magnitude and its direction, the vibrations can be controlled. The plate is composed of two FG piezoelectric layers bonded with honeycomb structure as a mid-layer. Magnetic Lorentz force will be deduced via Maxwell's relations. A new quasi-3D plate theory considering the shear and normal deformations is incorporated to evaluate the displacements. The governing equations of motion are introduced via Hamilton's principle. Galerkin technique is considered to solve the motion equations for different boundary conditions. Influences of the magnetic field, boundary conditions, electric voltage, and core thickness on the eigenfrequency of the FG sandwich piezoelectric plate are illustrated. It is found that considering the effect of the magnetic field on the smart devices increases their vibrations, which may lead to an increment in the energy harvested from them. Further, when the magnetic field is applied along the length of the rectangular plate, the vibrations are reduced and vice versa.