Any other symptoms? What setting is the HVAC usually on?
I would start by bleeding the cooling system and go from there. Also, if running the A/C, make sure the condensation is dripping out below the car. No puddle means you have blockage somewhere.
Has the car done this the entire time you have had it, or is it something new? We had an F-150 4.2 at work with like 300K miles that would do this all the time under hard acceleration, but the heat was always hot, A/C always cold, and the floor was always dry, so I never thought anything of it. Not my truck, not my problem.