The upgrade can be done via the website, and will come to PlayStation 4 at a later date.
PlayStation Network has now been updated to allow users to upgrade their sub accounts to master accounts, once they hit the age of 18.
PSN's sub accounts are there for parents to create for their children, via their own maser account. The sub account's can be managed by parents to monitor and control what their children have access to on PSN.
Previously when you wanted to have your own, full PSN account, you couldn't use the sub account you already had. You would need to create a brand new account, meaning you lost all your your player data, including the trophies you had worked hard for.
On Thursday PlayStation announced that sub accounts can now be upgraded via the website. Head on over here for more info, and to upgrade. The ability to upgrade directly through the PlayStation 4 will be added at a later date.