Results of studying the domain structure of planar Ni microparticles formed on single-crystal substrates from the lithium niobate and from the potassium titanyl phosphate at different temperatures are presented. The dependence of domain sizes on the sample temperature was studied. It is shown the observed change of the domain structure is caused by the magnetoelastic effect, which arises due to the difference in the thermal expansion coefficients of the substrate and microparticles as the sample temperature changes. It is shown, the sizes of magnetic domains, up to the creation of a state with a quasi-homogeneous magnetization may be set by the substrate temperature during the microparticles formation. Keywords: magnetoelastic effect, magnetic force microscopy, remagnetization, lithium niobate, potassium titanyl phosphate, temperature.