It is thought the youngsters lifted the purifying vents off and then sat on them.
A trainer on the scene turned hero by jumping into the pool to save the boy before emergency services arrived on the scene.
"He was only under the water and trapped for seconds until the purifier was turned off but it seemed like hours," a witness told local newspaper Levante.