AFAIK, there are still "Daytime" and "Evening" radio stations out there who have to shut down late nights. I think TV stations always could broadcast 24 hours, but most small market stations didn't have the programming or advertising to justify it (syndicated programming costs $$). Living in a large market for the past 40 years, I don't know what the small market situation is these days.
That's mostly right.
The daytime-only stations are primarily on AM, just because the atmosphere does some weird things to AM (and shortwave, which is dying an unwarranted slow death) signals that it doesn't do to FM or TV signals. Any station is allowed to sign off during the overnight hours (technically, any time from 10 p.m. to 6 a.m.).
Ever since the 21st century, though, these licenses (radio to an extent, but even moreso with television) have been gobbled up by a few huge companies, and with automation systems, there's no real point for an FM or TV station to sign off anymore. Gray is one of those companies. Go to almost any city with TV stations and you'll find that most, if not all, of the stations are held by a small number of huge companies. Sinclair and Nexstar are the big ones: their practices are almost predatory. Then you have the mid-sized ones: Tegna, Weigel and Scripps, for example, focus mainly on medium-sized markets. The major networks own stations, but mainly only in the big cities. Gray's one of the companies that focuses on the rest of the country.