An improved method for conducting a sorption X-ray fluorescence analysis of mercury (II) in water with static and dynamic preconcentrations in the form of iodide complexes on polyurethane foam sorbents based on ethers has been proposed. It was shown that optimizing the conditions of measuring analytical signals enabled a significant (one order of magnitude or more) increase in the sensitivity of the detection of X-ray fluorescence and widening of the linear range of graduation dependence.