Taking a decongestant helps, especially if there was a recent cold or sinus problem.
I fly weekly and colds can't stop me, so (after discussing this with my ENT after a particularly bad/painful flight) I always carry Afrin Nasal spray. If I have any type of cold/sinus thing going on, I use it before the flight. The decent is usually much more painful that the accent, so if I didn't think I needed the spray and end up having a problem on the way up and I will use the nasal spray so I don't have a problem on the way down. I also always take a tylonel sinus before I fly. I used to suffer ear pain frequently but it's been a long time since I started taking precautions.
Ear planes are great for kids, but I usually make sure we have some childrens decongestant with us just in case. If he complains on the way up, he get's a chewable decongestant on the plane.