The 40-year-old woman, who has not been named, gave the boys some money to get themselves some chips and then headed into a bar.
When the boys returned they couldn't spot their mum and decided to separate and search the busy Costa Blanca resort to try and find her.
One of the boys was taken to the local police station by a couple who found him wondering the streets alone.
Benidorm is a huge resort. Photo: AFP
His brother was later discovered sleeping in the doorway of their holiday apartment in Finestrat, having made his way across town to where the family was staying.
A statement from police explained: “The search for their mum continued throughout the night until she was found at 8am the following morning sleeping peacefully inside her holiday flat.
“She claimed she had lost her children around 8pm the previous evening while she was out drinking and admitted she hadn't gone looking for them or alerted police because she thought they knew the way home, despite it involving them crossing the whole of Benidorm on foot.”
Both sons were taken into care while she was taken to court to appear in front of a judge in a private hearing where she was asked to explain herself.
Neither the name of the woman nor the result of the court hearing on Friday was made public by the Spanish authorities.