Burn the midnight oil
tɾaβaxaɾ asta altas oɾas ðe la notʃe
In Spanish Trabajar hasta altas horas de la noche
This idiom is widely understood and used in Spanish-speaking cultures.
Example
"Tuve que trabajar hasta altas horas de la noche para terminar el proyecto."