The paper considers a quasi-periodic structure of microcavities formed under the fiber fuse effect in optical fiber, which can be used as a sensing element for an optical sensor based on a Fabry-Perot interferometer or an optical radiation scatterer with improved parameters of flexibility and robustness. Mathematical modelling of the radiation propagation and reflection on the microcavities of the in-fiber structure will make it possible to predict the characteristics of the sensors to be developed. The modelling was performed in the COMSOL Multyphysics package, Electromagnetic Waves unit, Frequency Domain. A section of SMF-28e single-mode fiber with microcavities placed in the core and whose dimensions were measured in the course of empirical investigation was examined. To solve the problem, a system of equations describing the propagation of a plane electromagnetic wave in matter was compiled. The results showed that the calculated reflection spectrum qualitatively coincides with the measured value but does not describe it with high accuracy. This can be attributed to the fact that the model does not take into account the intermodal interference in the fiber and does not have an introduced melt zone around the microcavities, as such a melt zone has a complex refractive index distribution and composition.