The ministry made the decision following a public outcry due to a previous announcement that these prayers would be suspended due to health concerns related to the coronavirus.
Muslims usually hold the Tahajjud prayers after midnight during the final 10 days of Ramadan, with some going to Itikaf, a spiritual retreat inside mosques.
The religious endowments ministry said it discussed allowing the prayers with the health ministry and the committee to manage epidemics, who agreed to resume the late-night prayers that had been suspended in mosques nationwide for the past two years due to COVID-19.
The Holy Month of Ramadan will end on 1 May.
The ministry added that the Itikaf in mosques is still not allowed.
This year, the ministry allowed in-mosque daily prayers and mass night prayers (Taraweeh) during Ramadan, as it had last year. Ramadan charity banquets have also been allowed.
On Saturday, the Ministry of Health announced that an average of 89 coronavirus daily infections and six deaths cases were recorded over the past week.