Surviving the assault with a leg injury, the 26-year-old Moroccan remembered seeing "bodies, blood and pieces of flesh everywhere."
At least 44 people were killed and more than 130 severely wounded in the attack in the Tripoli suburb of Tajoura overnight, according to the United Nations.
Hafyan had been detained in the centre for three months, after coming to Libya with a fellow Moroccan hoping to reach Europe by crossing the Mediterranean.
His friend survived the attack unscathed, but his t-shirt was stained with other people's blood.
"We were lucky. We were at the back of the hangar," he told AFP.
Both men feared being held in another detention facility in Libya, where rights groups say migrants face horrifying abuses.
"We want to get out of here, if not we will be imprisoned again. We want to go home," said Hafyan, pushing to leave the hospital.
'The doors were closed'
The vast detention centre contained five hangars, where around 600 migrants and refugees were sleeping when the first strike hit a nearby building.
"We were scared. We wanted to leave but the doors were closed," said Abdelaziz Hussein, in his forties, from Sudan's Darfur region.
"A quarter of an hour later, the second strike directly hit hangar three. I was in number five. It's then that they (guards) opened the doors for us," he added.
The blast left a crater around three metres (10 feet) in diameter, surrounded by fragments of clothes, shoes and debris ripped from the metal structure.
In a separate area of the hangar, where human remains were still visible, the strong stench had attracted flies.
Visibly in shock hours after the strike, Hussein and other survivors had gathered up their bags and blankets, choosing to stay outside despite the heat.
"We are constantly in danger," he said, describing air raids in May which he said wounded numerous migrants at the centre.
Libya's internationally-recognised government has blamed the attack on commander Khalifa Haftar, who has denied responsibility.
Haftar launched an offensive in April from his eastern stronghold to take the capital, sparking a battle which has killed more than 700 people according to UN agencies.
'No place to go'
Hussein blamed the UN refugee agency for failing to secure the migrants' transfer, as pleas by international organisations to move those held in detention centres away from the fighting fell of deaf ears.
"What we saw last night is horrific. The corpses, the dismembered bodies, the wounded who were bleeding. There was blood everywhere," said Hussein.
He said he has been registered as a refugee with the UNHCR for three years and lost nine Sudanese friends in the air strike, all of whom had fled the conflict in Darfur.
The United Nations said it had shared the coordinates of the Tajoura facility with the warring sides, to ensure that civilians there were safe.
Having survived the attack, 17-year-old Radhouan Abdallah remained worried about his future.
He said he had been placed in five different migrant centres since being detained in western Libya in October 2017.
"I'm still waiting for the UNHCR to find a solution for me. Even if I leave here, I have no place to go," he said.
"Outside, I risk being detained again, tortured or killed."