A method for measuring the bremsstrahlung X-ray spectra of electrons accelerated in a laser plasma using Medipix matrices has been developed. The application of the matrix provides the spectrum accumulation in a much shorter time, as compared to detectors based on a scintillator and a photomultiplier commonly used for such measurements. This ensures dynamic monitoring of the X-ray characteristics and prompt adjustment of the laser source parameters to obtain the maximum X-ray yield and energy. The results of measurements of the X-ray spectra at the ILC MSU terawatt femtosecond-laser complex for various laser-plasma interaction regimes are presented.