If you're going in August, check out the courtyard fountains in Somerset House - I think your 5 yr old will enjoy them!
Ditto the science museum, the Diana memorial playground in Kensington Park is fabbo (Peter Pan themed, big pirate ship climbing frame, artificial beach, wigwams, wooden cabin slides etc, cafe is expensive but go 2 mins up Queensway and find all manner of excellent Chinese restaurants, also McD's and the usual chain stuff in Whiteleys shopping mall)
If it rains the Namco place next to the Aquarium on the South Bank is good but can be expensive (indoor dodgems, rides etc).
Depending on how easily your child can be dragged away without demanding purchases, Hamleys on Regent Street is always good for a look around, they have various demos of toys going on at all times and lots of interactive stuff that you don't actually have to pay for, iykwim...
This may be for an older child, but if they like the Harry Potter films and you're anywhere near the City, take them to Leadenhall Market (aka Diagon Alley), lots of interesting shops and places to eat there too! Then scoot down to the Monument/Tower of London or up to the Museum of London, which is deffo worth a visit. Spitalfields Market, just behind Bishopsgate, has child-friendly restaurants and is good for a mooch around.
Definitely wear comfy shoes!