Once WordPress 5.0 is officially released, it will start showing in your WordPress admin dashboard. Simply click on the Update icon or Dashboard >> Update. Then click on Update Now button. Now it will start updating your site.
As long as your site is updated, it will be in maintenance mode. As soon as your updates are complete, your site will be back to normal.