Try to sleep as much as you can on the plane. This is the real advantage of flying in F. Taking Melatonin right at departure helps me falling asleep. Then stay active in PEK. You could either do the Great Wall tour as suggested or just go into the city to the usual sights (Forbidden City etc). Just stay active, no naps. You will be exhausted when arriving in Bangkok. If you are on the early SYD flight next day just stay close to the airport (the Novotel is good, inside the airport but pricey, some other hotels are close by), other hotels in the area provide free shuttles. Go to the airport early for the massage in the F lounge.
If you are on the late flight to SYD my recommendation is staying in the Sukumvit/Ploenchit area. Lots of good hotels there. Traffic is light in the evening. A Taxi will be around 300 bath and will take less than 30min. ust make sure you go to the official Taxi stand. Depending on your budget you could arrange for a guide and a car (thru the hotel) for some sightseeing and have the car drop you off at the airport at the end.