You can't do it for most fields. As it's a polymorphic relationship field, you can utilize Type to get the object of a polymorphic relationship, but you're limited in what fields are accessible through that key.
WHERE What.Type IN ('Opportunity')
This is highlighted in the Name object documentation.
Non-queryable object that provides information about foreign key traversals when the foreign key has more than one parent.
This object is used to retrieve information from related records where the related record may be from more than one object type (a polymorphic foreign key).
The only available fields are those listed in the above
Name object documentation. As such, you won't be able to go to the Account from the polymorphic field.
You can also check which fields are available for accessing by running a describe on a field and seeing if
true. Below is an example of looking at the
Phone on the Account standard object.