AlGaN-based UltraViolet Light Emitting Diodes (UV LEDs) are promising devices for replacing the conventional UV lamps, which contain toxic substances like mercury, in order to have smaller devices, lower operating voltage and the possibility of tuning the emission wavelength by changing the Al and Ga content in the alloy. However, UV-LEDs may suffer from a relatively fast degradation of electrical and optical characteristics, that can be due to the generation of defects that increase the Shockley-Read-Hall (SRH) recombination components. The aim of this paper is to study the behavior of UV-B LEDs submitted to a constant current stress, through electrical, optical and spectral characterization, and capacitance deep-level transient spectroscopy (C-DLTS). The results of this analysis demonstrate that UV-B LEDs show a decrease in the driving voltage, probably correlated with the increased activation of the Mg dopant, and an increase in subthreshold forward current, ascribed to the generation of mid-gap defects caused by the stress. We also found a strong optical degradation at low current levels, that indicates the increase in SRH recombination, probably due to the increased density of mid-gap defects. To investigate on the origin of the defects, we carried out C-DLTS measurements; the results indicate the presence of Mg-related defects and/or intrinsic defects related to the GaN growth. Moreover, after stress we notice the appearance of a peak that is strictly related to the increase of mid-gap defects generated during the stress.