You are right and Sominex is DPH in USA and Canada, but promethazine in the UK. (And apparently the Indian version of peptol-bismol.)
Doesn't matter, since all five 1st gen antihistamines are CYP2D6 inhibitors.
Now, for solubility, keep in mind that nearly everything that isn't a gas at ambient pressure, will be more soluble in hotter water, including codeine.
I went based on the big acid moiety hanging off of ibuprofen, which with enough water to keep the pH at 7 and up, assures it'll have a charge and remain freely water soluble, even with a oily overall structure. Codeine has a polar group, and maybe that nitrogen can keep a charge at pH 7, maybe not. So I figured ibuprofen would be easily more soluble.
Well, its not so clear. What is clear: adjusting the pH will have a dramatic difference, and tweaking that is probably better yielding and easier than temperature dependence. Really, at pH 7 they should both be quite soluble in water. Raise the pH and the ibuprofen will stay water soluble, lower it and it'll readily drop out of solution.
The pKa of ibuprofen is an oddly high 4.8-5.0, so adding a lot of lemon juice should knock it right out, as long as there aren't a lot of buffers added to the pill binders. You're aiming for a final pH of three or under, and lemon juice comes in at 2. Once you've filtered the slurry, you can always dilute it back to drinkability.
The codeine will remain polar at a pH under 3, and if that nitrogen will take a charge, it will absolutely be charged at that pH, and remain soluble.
If you looked up ibuprofen at wikipedia or pubchem, you may see it listed as "practically insoluble". Yeah, similar to amphetamines, that's for the uncharged form, the "acid" form of the molecule. We're interested in sodium ibuprofen, which is soluble in water at 25C and pH 7 to 100mg/mL. The pills might not contain sodium ibuprofen, but they will become that "form" when smashed and stirred in some hot water.