Two types of near-UV light-emitting diodes (LEDs) with an InGaN/GaN single quantum well (QW) differing only in the presence or absence of an underlayer (UL) consisting of an InAlN/GaN superlattice (SL) were examined. The InAlN-based ULs were previously shown to dramatically improve internal quantum efficiency of near-UV LEDs, via a decrease in the density of deep traps responsible for nonradiative recombination in the QW region. The main differences between samples with and without UL were (a) a higher compensation of Mg acceptors in the p-GaN:Mg contact layer of the sample without UL, which correlates with the presence of traps with an activation energy of 0.06 eV in the QW region, (b) the presence of deep electron traps with levels 0.6 eV below the conduction band edge (E-c) (ET1) and at E-c 0.77 eV (ET2) in the n-GaN spacer underneath the QW, and the presence of hole traps (HT1) in the QW, 0.73 eV above the valence band edge in the sample without UL (no traps could be detected in the sample with UL), and (c) a high density of deep traps with optical ionization energy close to 1.5 eV for the LEDs without UL. Irradiation with 5 MeV electrons led to a strong decrease in the electroluminescence (EL) intensity in the LEDs without UL, while for the samples with UL, such irradiation had little effect on the EL signal at high driving current, although the level of driving currents necessary to have a measurable EL signal increased by about an order of magnitude. This is despite the 5 times higher starting EL signal of the sample with UL. Irradiation also led to the appearance in the LEDs with UL of the ET1 and HT1 deep traps, but with concentration much lower than without the UL, and to a considerable increase in the Mg compensation ratio.