Is there any reason why 5 volts is so ubiquitous for powering small consumer electronics?
While the original call for 5V was doubtlessly for TTL (as mentioned in the comments, specifically the reverse-biased BE junctions of bipolar transistors which are almost ubiquitously rated for 6V), there are several other things that play nice with the 5V standard:


reverse voltage rating of LEDs is usually 5-6 volts as well, so 5V is suitable for charlieplexing
charging single Li-Ion cells powering devices like the said phones, tablets, etc. You take the USB standard voltage, which is 5V ±5%, so 4.75 min at the USB socket. Then your cable will have some resistance, so what arrives at the device can be diminished by a few 100s of mV. And then you can use a simple linear battery-charging IC like the MCP73831, which will charge the battery to e.g. 4.2V. Since the source and target voltages are near, the losses would be manageable. Linear converters are much simpler than the alternative (DC-DC converters), and are especially suitable for a low-power device, meaning simpler and more compact power electronics and lower cost. If the standard were 4.5V instead of 5V, probably the battery wouldn't charge completely in the worst case (and DC-DC would be a must). If it were 6V instead of 5V, then the linear regulator losses would start to become considerable. 5V is a good middle-ground.


On the last point though, I'm not really sure what's the causality direction. It could be that Li-Ion fitted perfectly with power supply rails for typical small electronics, which led to its ubiquitous use.