Ok - right off the bat i want to say one thing... NO MEDICATION!!!(And yes i am a parent with quite a hyperactive 5 y.o.) Its the wimps way out and not going to help for the rest of the childs life. FWIW - does the kid sit quietly at home or play by themselves? If so, its generally better on a plane coz it's a new, unfamiliar enviroment which will leave them scared or interested to check it out.
We travelled with a then 3 y.o. on a 36hr flight from HBA-FCO(dont ask!) and she only complained for the last half hr coming into FCO - and believe me the adults were worse off! What MrsGurio did - as has been suggested - was get a whole big bag of carry-on and fill it with puzzles/games/stickers/whatever GrommetGurio was interested in. I first said that it was pointless but believe me it worked a treat - as long as you bring them out slowly when they lose interest with the current item. Also, as has been mentioned before as well, QF at least provides wiggles bags which has some goodies. Food is always served first dependant on age. Youngest first. For GrommetGurio, she loved it as she could sleep/eat/walk/pretty much do whatever she wanted to for a day and a half. Like others have said - train now for the trip. Put big over-the-ear headphones on them now. We found the GrommetGurio hated in-ear phones so we found the over-the-ear ones worked much better. I would put a photo up but i don't have one that doesn't show someone who doesn't want to be shown! We also went for plenty of walks that kept her entertained for at least 10 minutes at a time. The FA's were awesome and help out so much - don't watch Flight Plan the movie, but let them take the kid and walk around with them. It's something new and exciting once again, but that is assuming that the kid will go to other people readily - with GrommetGurio, she'd go to anyone.
The issue was actually on the way back. As she now knew what was going on and how to deal with it. If it wasn't that, it was probably the fact that she was sick of being on holidays. Thank goodness we had an overnight in SYD to break up the trip otherwise it might have been a different story.
Other than that, follow the others advice here - but please, just don't medicate them. It doesn't teach them anything other than medication is the way to fix problems. GrommetGurio has been on far too many planes in her short 5 year life time, like most of the kids of people on this board, and now she knows whats expected of her and acts accordingly. But don't think for a second she doesn't try to push the boundaries but i would imagine that you wouldn't be up to that point yet.