Yes, it is possible to get a good night's sleep in the busiest quarter of the city. You just have to choose your hotel wisely.
The Knickerbocker Hotel was once known as "the 42nd Street Country Club" for its ability to attract Hollywood stars and Gilded Age elites (it was built by an Astor, after all). Following a thoughtful renovation, the hotel is just as beautiful as ever. But now there's a Charlie Parker restaurant and a rooftop bar with "sky pods."
If an end-of-the-day recharge is what you're after, the health-centric Kimpton Hotel Muse stocks each room with yoga mats and (more importantly) comfortable beds.
The W Times Square may feel clubby in the lobby, but the higher-floor rooms with window seats will make you feel as if you're flying high above the city--and you can practically see as far as JFK airport.
To end the night in style, stop in for a drink at the sexy glassed-in Refinery Rooftop, arguably the city's best rooftop bar.