A cabin crew member got two cups with hot flannels in the bottom and placed them over both ears. It seemed to do the trick. Hope this helps.
Ironically, this technique is dubbed "the mickey ears' trick"
A classic trick is to chew bubblegum as it stimulates the production of saliva, and swallowing will equalize the pressure inside your ears. This does not work for everyone, also don't forget to pack bubblegum since airports no longer sell them
Pinching your nose and trying to blow hard through your nose might also manage to relieve some passengers. Actually some pilots do that trick during landing procedures.
You're more prone to getting pain from the altitude change when you have a cold, or a blocked sinus.
Some MDs might recommend the use of corticoids prior to the flight, that sometimes help, sometimes it doesn't, but anyway physician's advice is mandatory for such medications
homeopathy is not unheard of, and treatment needs to be started days or weeks in advance.
special ear plugs can also be purchased, with various results
each person is different, so in the end it might only be trial and error