Try a place that sells racing gear, they have special padding with the centre hole off-centre. You line it up so the most padding is on the front of the bar where your head could make contact, and the least padding on the back.
The density of the foam is chosen for this application and it is u.v. resistant, unlike pipe insulation, so it will not degrade from a year in the sun.
Or you could save money, its your head, you decide....