Between 2020 and 2024, the number of restaurants offering 24-hour service declined by 18%, according to Yelp data.