Should I include the names of my Master's and PhD supervisors in my CV? Next month I will be graduating from university in the UK with a Master's degree in Astrophysics and in October I will be starting my PhD at a different UK university.

I have seen some academic CVs that list the PhD supervisors that person had, alongside the usual information such as the institution and start/ finish date. 

I suppose the advantage of including your supervisor's name on your CV is so that a person reading it can get an idea of the kind of work you're doing (if you don't have any publications of your own yet and if they know what your supervisor's research interests are) and how you fit into their network via the supervisor.

As someone with currently a very short academic CV, is it ok for me to include the names of my Master's and PhD supervisors? What are the advantages and disadvantages of doing so?

Note that I know who my future PhD supervisor is.
Additionally, your supervisors might have written you letters of recommendation for grad school (or could in the future for other grant applications). Thus, mentioning your former supervisors is a form of acknowledgement and transparency for other researchers or research institutions.  I totally agree with the former comments that in 90 %, it won't harm you.  In case you are completely unsure, you could ask your former supervisors whether they are okay with it (but I would be surprised if there is an academic scholar who says no)