James Berger checked in to the Sonesta Simply Suites hotel in Braintree last November during a moment of desperation. He and his nine-year-old daughter had lost their housing in Roxbury when the relative with whom they were living was evicted.

“I was told I was not eligible for any type of shelter or anything of that nature because I make above $1700 a month,” he recalled.

If he had been alone, he says, he likely would have found a rooming house. But as a single father, he was concerned about the safety and privacy of his daughter, Jamilla — then a fourth grade student at the Higginson-Lewis School in Roxbury.

“I’ve got to be concerned for my daughter,” said Berger. “I just want her in a place where she feels stable.”

The Berger family’s plight is hardly unique. Massachusetts Department of Elementary and Secondary Education data from 2018 to 2021 indicate that at any given time about 20,000 public school students statewide experience homelessness; about 4,000 of those students attend Boston Public Schools.

Even with the help of an advocacy organization, finding housing for those students and their families can take months — or, in some cases, years. James Berger, who had hoped his hotel stay would be short, instead embarked on a months-long odyssey that included working 80 hours a week and holding out hope that he and his daughter would be able to move back to Boston.

“Housing is so unpredictable,” explained Candice Harding, a parent organizer and advocate at Higher Ground, a Roxbury-based nonprofit that helped Berger apply for an emergency housing voucher and a public housing unit. “Sometimes the list will move really, really slow and you could be on it for 10-plus years — to something changes, funding comes through and then, all of sudden you’re getting called ‘you’re at the top of the list.’”

To afford the $821 a week hotel bill Berger picked up an extra shift — working a 16-hour day that began when he and his daughter rose at 4:30 a.m. to get to his job in Boston. He brought his daughter to work — taking breaks to bring her to school in the morning and pick her up in the afternoon.

That arrangement lasted three and a half months until the option for a second shift ended and his daughter was no longer allowed to join him at work. He reduced his hours to accommodate his daughter’s schedule and, by early April, was counting the days until he could no longer pay the hotel tab.

“I’m at the end of the financial stability aspect, I can’t cover this past next Friday,” he said.

A few weeks later, during school vacation, he and his daughter drove to Georgia to visit family. His plan was to come back to Boston, but with no guarantee of when or, even if, a housing unit would become available, he made the decision to stay in Georgia where he and his daughter have remained living with family.

It is, he said, a better situation for his daughter. But they’re both starting over — she’s in a new school; he’s landed a job driving a truck and is working on building a new professional network that he hopes will lead to the goal he was working toward in Boston of one day owning his own trucking company.

Massachusetts, he said, is rich with opportunity but he says affording the cost of housing requires a high income — or an extremely low one.

“I basically was penalized for having a job,” he said. “So, it was like, quit your job you can get all the help you want.”

Harding shares Berger’s frustration.

“We made all these phone calls, we submitted all these documents,” she said. “This man has done everything you asked him to do.”

Higher Ground, in partnership with other nonprofits and public agencies, has successfully housed the families of more than 500 Boston Public School students since 2018.

Harding says the Berger family is the first one she’s worked with who decided to leave the state.

“This was the first time that I've ever been through something like this, that it was this difficult to get a family housing or into shelter,” she said. “It definitely gave me a different outlook on how to help families going forward.”