The 23-month-old boy was said to have had an "extremely lucky" escape following the explosion, which left just under an inch of the nail lodged in his brain.
Surgeons at Great Ormond Street Hospital removed the nail during an intricate one-and-a-half hour operation in the early hours of yesterday.
Last night the boy was said to be "happy and contented and wondering what all the fuss was about".
A spokeswoman for the hospital said the nail pierced the boy's temple.
"It caused superficial injuries to the brain but it didn't affect any of his central brain," she said.
"There was also no major damage to any of his vessels. It was not a complicated operation but it was still brain surgery."
During the emergency operation surgeons had to repair and replace the essential bone protecting the child's brain, where the nail punctured the skin.
They first removed tiny layers of skin, muscle and membrane from the head and made a series of small holes in the skull. Then, using a saw, they cut between the holes and lifted back a small amount of bone like a lid, revealing first the membrane lining of the brain (known as the dura) then the brain itself.
The spokeswoman explained that the surgeons then "explored and cleaned the wound, removed a small amount of the bone which was replaced and then sewed him back up again".
The boy, who is not being named, was said to be happy and well yesterday but he will remain under close observation in the neuro-surgical ward for the next few days. His parents are at his bedside.
The hospital spokeswoman said doctors wanted the boy to remain in hospital so "they can keep a close eye on him and make sure there is no infection".
The spokeswoman said that he was expected to make a full recovery.
"It is too early to tell if there will be any brain damage but all the signs suggest that there is no long-term damage."Reuse content