We focus on the thermal neutrons interaction with sapphire and MgO crystals that are frequently used as thermal neutron filters. The LEAPR module of NJOY code has been used to generate the thermal neutron cross sections for sapphire and MgO crystals at different temperatures. The phonon density-of-states, required by the LEAPR module, has been calculated using the ABINIT package. The generated cross sections allow us to study the temperature effect on the quality of each filter and to compare the filtering powers of the two considered crystals. Geant4 simulations based on the generated thermal cross section give reasonable transmission rates for sapphire filter at room temperature.