The heat has been compounded by chronic power shortages, depriving homes of electricity for large parts of the day.
The conditions have placed a particular strain on Iraqis displaced by an assault on Falluja, a UN official said.
Average temperatures in June were the highest recorded worldwide - a rise attributed to greenhouse gas emissions.
According to the US National Oceanic and Atmospheric Administration (NOAA), the combined average temperature over global land and ocean surfaces for June was 0.9C above the 20th Century average of 15.5C.
The soaring temperatures, coupled with shortages of drinking water and electricity, have made life harder for Iraqis displaced by a military assault on Falluja, a town formerly held by so-called Islamic State militants.
A UN spokeswoman who visited two camps for the displaced this week told the BBC that many residents were only "grabbing one or two hours of sleep a night" because of the heat.
Caroline Gluck, from UN refugee agency UNHCR, said people at camps in Habbaniya and Amiriyat al-Falluja were trying to keep cool by moistening their clothes.
She added that many families had only brought one set of clothes with them. Several residents had developed pus-filled sores, she said, possibly as a result of the heat and inadequate hygiene.
Near-record temperatures have also been reported in neighbouring Kuwait. Across the region, social media users have been tweeting about the heat.
@9Khaled5 tweeted: "#Heatwave_strikes_Saudi A moment of silence for the death of the greatest inventor in history…Willis Carrier, the inventor of air conditioning."
@7510x_ asked: "Is this heat or has Kuwait entered the [hell] fire?"
@sa113355 shared a video that claims to show a man in the Iraqi city of Basra, frying an egg on the pavement.
And @noorhan__ali described the heat as just another test of the Iraqi people's tolerance, alongside "rubbish internet", "attacks by cockroaches" - and Islamic State.