Liz Whyte, headteacher of Royston primary in one of the capital's most deprived areas, told a 10-strong panel of experts who visited Edinburgh, Manchester, London and Gloucestershire for the Shelter investigation that some families had to move up to eight times in two years.
The report, Generation squalor: Shelter's investigation into the housing crisis, quotes Ms Whyte as saying: "It makes the organisation of the school difficult, because what we try and do is identify children's needs and put in support. We identify a need, we start to put in the support, and then the family moves."
Ms Whyte also described the physical impact on children's health. "There are so many issues with people in short-term accommodation. They've not got a cooker, some of them, and this is the 21st century. A few of my children are still lying on mattresses on the floor."
Sleep patterns and health often suffered. "We've got a lot of children who are just not well - a lot of tummy bugs, and a lot of children who are in hospital.
"The mental health issues are so huge. We have nine-year-olds self-harming.
There's a lot of rocking, fingers in ears, bizarre behaviours. When life's hard, you just draw into yourself. A lot of children display autistic spectrum behaviours.
"School is often the only constant in children's lives, and never underestimate the power of peers. Who's got a best pal? Everybody. You need your pals. Now, if you've been in eight schools in two or three years, you don't have a best pal. You're lucky if you have a pal at all.
"That has an enormous impact on a child's well-being."
She added: "It's easy for us to say all children are resilient, they'll be over it in a fortnight. They might get over it for the first time after a fortnight, but the second time their resilience is dipped into, the third time their resilience is dipped into . . . and there can only be so much resilience. There's only so much within ourselves. Some of us just sink."
A spokeswoman for Edinburgh City Council said: "The education department would like to make clear that the comments made by Liz Whyte, headteacher at Royston primary school, relate to her experiences of the effects of homelessness on those children she has been in contact with throughout her career and not just during her time at Royston primary."