I think the main reason Ibuprofen helps with high altitude sickness is because it is anti-inflammatory and has a bit of a diuretic affect. In fact you can become deficient in potassium on higher doses of Ibuprofen and most people see an improvement in myotonia when they take medications that cause them to lose some potassium. I take a small dose every day but I always make sure I take something called DGL Ultra with it to protect my stomach. This is a form of licorice root which has had the compound removed that can cause high blood pressure. It works extremely well to prevent GI symptoms with NSAIDS including aspirin. You can get it at any health food store or online. The nice thing is that it's chewable chocolate lozenges and they taste great :-)
It's certainly worth a try, but don't exceed the recommended dosage without a doctor monitoring. Ibuprofen is quite different from the other NSAIDS on the market like naproxen (Aleve) or aspirin. It has even been shown to help regenerate the myelin sheath on damaged nerves.