What does Actions -> Optimize do in "Database Storage Usage By Tables"?

What does the following functionality Actions → Optimize do in “Database Storage Usage By Tables”? I searched for documentation but couldn’t find anything online. Anyone familiar with this functionality?
(I am thinking about reducing the database size - not sure if this is the right functionality and don’t wont to screw up my database)