On the Table toolbar, click on the Optimize Size icon and undock the toolbar that appears - it is named "Optimize". The icon has been renamed from "Optimize" to "Optimize Size" since 5.1 and the toolbar should be renamed as well. Checked in 5.1.1 and 5.0.5.
On pc Debian x86-64 with master sources updated today, I could reproduce this.
https://gerrit.libreoffice.org/#/c/23381/
Julien Nabet committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=e0df62ae59b84b48787fa21fe083a0454c82a914 tdf#98789: use "Optimize Size" also in toolbar It will be available in 5.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Stanislav Horacek committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/help/commit/?id=de40cf2cd0acf0bcd2512bca652cacd683128fba tdf#98789 rename "Optimize" toolbar to "Optimize Size"