First-hand experience, but several years out of date:
Nairobi Airport in general was safe. There was a strong security presence and initial security checks are actually conducted at the entrances to the airport itself, prior to check-in.
I don't recall the general airport area being particularly quiet, or welcoming, or any of it being particularly comfortable. We had to spend several hours there and it's a functional but old airport - quiet once you're past the post-checkin security checks, but not somewhere I reminisce on fondly.
Unless I was trying to save every penny, I'd get accommodation elsewhere (if trying to sleep) or set up camp in a hotel bar or cafe (if just wanting to rest). It's only about USD 20 to get a taxi into the city, with Uber being half to a quarter of that price.