Hexagonal diamond (h-C) and wurtzite boron nitride (w-BN) are two superhard materials recently identified to be comparable to or even harder than their cubic counterparts, cubic diamond (c-C) and cubic boron nitride (c-BN). To understand the effect of lattice structure on thermal transport in these materials, we conduct first-principles calculations to investigate their harmonic and anharmonic lattice properties. Owing to the strong C-C or B-N bonds, h-C and w-BN are found to have a high lattice thermal conductivity (κL) exceeding the overall thermal conductivity of metals, albeit lower than that of their cubic counterparts. By analyzing the phonon band structure and volume of the 3-phonon scattering phase space, we attribute the lower κL of the hexagonal phases to their larger volume of 3-phonon scattering phase space than the cubic ones. Moreover, we reveal that a high pressure of 125 GPa leads to a two-to three-fold increase in the κL of these materials, because the pressure enlarges the optical-acoustic phonon bandgap and thus reduces the volume of the 3-phonon scattering phase space. This work uncovers the significant effect of lattice structure and pressure on phonon scattering and transport, which is crucial for the application of superhard materials.