Nairobi airport is truly awful , the air-con is terrible , the facilities even worse and gates with seating don't open until pretty near the departure time.
I would recommend that you do not spend six hours there. Not sure where you are coming from or what your budget is or if you already have a multi-entry vis for Kenya.
If you ar not too jet lagged you could get a taxi to a largeish hotel , have lunch /supper , relax by the pool in the sun or whatever. We have spent several afternoons by the pool in the Serena , which was lovely.
Another option is to get a taxi to take you to the Nairobi National Park for a few hours or to the Giraffe Centre and then onto a restuarant for supper. But, if you are coming from an amazing wildlife destination this may not be too exciting.
The Nairobi National Park is lovely , saw black rhino and lion on a flying visit there.
Nairobi has some really really nice parts , thankfully the Nairobbery years are in the past, so there's no reason to spend your time there in the airport.
Finally check with the passport officers when you arrive that you do not need a Kenyan visa. They are the most friendly charming people and give a wonderful first impression and really will help you if they can.
Hope this helps