Hi,
This post has interesting information about your question: https://forum.mendix.com/link/questions/8816
Basically you need to take a backup of you database and then restore it to the Mendix cloud. Mendix also states this in their documentation → https://docs.mendix.com/developerportal/operate/database-size-reduction#2-recovering-physical-disk-space
2 Recovering Physical Disk Space
Physical disk space can be recovered by creating a database backup, and then restoring it.
A database restore does a full physical rewrite of the database. It will compress the database to contain just the current records, and fully optimize the physical placement of files on the actual hard disk to maximize the performance of disk read operations.
You can create and restore a backup in the Mendix Developer Portal on the Deploy -> Backup page.
Hope this helps!
Mendix runtime has a java api that allows you to run any SQL statement on the app database. You can use this to run vacuum full, but please be mindful that it will impact your running app: it will lock tables and impact availability. For some java jdbc examples see: https://docs.mendix.com/howto/extensibility/howto-datastorage-api/#retrieving-objects-using-sql