A group of students has spent a night in the school library after roads cut by NSW rains prevented the youngsters getting home.
Kendall Public School on the state's mid-north coast confirmed late on Saturday that all 28 stranded students had made it home safely after an unexpected sleepover.
"I want to express how proud I was of all the children and how well they coped with the challenging situation," principal Alison Jenner posted on Facebook.
Thirteen staff stayed with the children, when it was confirmed on Friday that flooded roads meant some families wouldn't be able to collect the children.
The region has received several days of steady to heavy rain.
Members of the community delivered beds, blankets, pillows and food to the school, meaning the students had chicken nuggets and lasagne for dinner and cereal and toast for breakfast.
"To all our school community and families - how wonderful you all are. Your support was amazing," Ms Jenner wrote.
With rain forecast to last until late next week, school attendance could be affected in some areas.