Your description suggests it could be kidney problem! - eg. Acute Nephritis
We need to check Blood Pressure / Do Blood tests (urea, creatinine
, blood count0 AND Urine routine especially for protein and cast.
The child needs to be seen by a Paediatric Nephrologist
(Child Doctor specialised in Kidney) - there are diseases with long term consequences, which may be preventable
All the best