I remember a couple times where I did Whitney again a week or two after doing it the first time and the second time I didn't really feel the altitude. But generally what works for me and makes a HUGE difference is spending an extra day at altitude before the hike. I used to just drive from sea level to the campground the afternoon before the hike, but now I leave a day earlier and stop at Mammoth Mountain Inn along the way. Then stay at the campground the day before the hike (Horseshoe Meadows is another great option but I can't sleep as well there as I can in a hotel bed).

Also the better conditioned you are, the less your heart has to work and thus the less you'll feel the altitude.