https://www.opm.gov/policy-data-oversight/pay-leave/pay-admi...
Though it sounds like on the Federal level, the employee must work a majority of their hours within a particular time period to qualify:
Night shift differential means the differential paid for work performed when the majority of a prevailing rate employee's regularly scheduled nonovertime hours fall between 3 p.m. and 8 a.m. It is computed as a percentage of the employee's rate of basic pay.
Don't get me wrong, I think the U.S. 24/7 retail economy is bonkers, but I'm not sure it's reasonable to just bless 9-5 as the official time of economic activity. In the 1990s, I ran a climbing gym, and typically worked 3pm-11pm (or some variation of that) Monday through Friday. I kinda liked that schedule, as it allowed me to be more productive with "life" stuff because I could accomplish things before I went to work.
If a business is having trouble staffing during certain time periods then it's a pretty clear indicator that they might need to offer more to entice people to work those hours. It seems like a pretty clear example of the free market in action.