The woman, in her 30s, left the boys - aged seven and two - without supervision for hours at a time.
They were found by representatives of the older child's school when they visited the family home in Wisbech, Cambs., due to concerns about his attendance.
They found the boy and his younger brother, who had soiled himself, at home on their own.
Following conversations with the elder boy it was discovered the mother used to regularly leave them unsupervised, sometimes in the evening.
The boy also disclosed he regularly went without breakfast and on the day of the visit had gone to a local shop, purchased a burger and cooked it unsupervised.
The mother, who cannot be named for legal reasons, pleaded guilty to two counts of doing an act of cruelty to a child at Cambri At Cambridge Crown Court last week, she was handed a six-month prison term, which was suspended for a year.
DC Diane Booth of Cambridgeshire Police, said: "Due to the actions of the teachers in this case we were able to safeguard these children and ensure they did not come to further harm.
"The mother showed a complete lack of regard for the safety of her children as she left them for long periods of time to fend for themselves without supervision.
"We all have a responsibility to protect children in our communities. I'd encourage anyone who is concerned about the welfare of a child to report it."
Anyone who is concerned for a child's welfare should call 101.