  We conducted a polarimetry campaign from radio to X-ray wavelengths of the
high-synchrotron-peak (HSP) blazar Mrk 421, including Imaging X-ray Polarimetry
Explorer (IXPE) measurements on 2022 December 6-8. We detected X-ray
polarization of Mrk 421 with a degree of $\Pi_{\rm X}$=14$\pm$1$\%$ and an
electric-vector position angle $\psi_{\rm X}$=107$\pm$3$^{\circ}$ in the 2-8
keV band. From the time variability analysis, we find a significant episodic
variation in $\psi_{\rm X}$. During 7 months from the first IXPE pointing of
Mrk 421 in 2022 May, $\psi_{\rm X}$ varied across the range of 0$^{\circ}$ to
180$^{\circ}$, while $\Pi_{\rm X}$ maintained similar values within
$\sim$10-15$\%$. Furthermore, a swing in $\psi_{\rm X}$ in 2022 June was
accompanied by simultaneous spectral variations. The results of the
multiwavelength polarimetry show that the X-ray polarization degree was
generally $\sim$2-3 times greater than that at longer wavelengths, while the
polarization angle fluctuated. Additionally, based on radio, infrared, and
optical polarimetry, we find that rotation of $\psi$ occurred in the opposite
direction with respect to the rotation of $\psi_{\rm X}$ over longer timescales
at similar epochs. The polarization behavior observed across multiple
wavelengths is consistent with previous IXPE findings for HSP blazars. This
result favors the energy-stratified shock model developed to explain variable
emission in relativistic jets. The accompanying spectral variation during the
$\psi_{\rm X}$ rotation can be explained by a fluctuation in the physical
conditions, e.g., in the energy distribution of relativistic electrons. The
opposite rotation direction of $\psi$ between the X-ray and longer-wavelength
polarization accentuates the conclusion that the X-ray emitting region is
spatially separated from that at longer wavelengths.
