"Some time later you entered the house through the window, entered the bedroom where the children were sleeping and what's disturbing is you not only removed your shoes but your shorts and underpants and climbed into bed."
Judge MacDonald said Thomas removed the pyjama pants from three children and "sniffed their exposed bottoms and genital areas".
"One child saw it happen and rang an adult on a cellphone. You saw that and decided to hide in a wardrobe where you were located a short time later, naked from the waist down."
Thomas was in breach of previous release conditions which stated he must not possess or consume alcohol.
The children's mother said in a victim impact statement she was receiving counselling.
After the sentencing she told the Rotorua Daily Post that she didn't think she would ever get over the incident.
"We caught him before he had the chance to do anything else," she said.
"We shudder to think what could have happened, but then you wonder if he would have got a decent sentence."
She said she and other adults were on the other side of the house to where Thomas was sleeping and she had given her son a cellphone so he could contact them without leaving the room. He had just turned off the TV when Thomas entered the room and moved to the four boys who were all in the same bed.
"We raced in. All we saw were the clothes and the wardrobe move. My cousin found him and he had no pants on."