On the MyGames page one of the sorting options is Opponent Name, but this can't give you what you want. Not all, in fact not even most, user names are in a form which identifies a player's surname. In my own case it's not even my real name. Others give surname only, first name only, initials and surname, or some combination of letters and/or numbers.
Since the surname is so often not identifiable, it will not be available for sorting purposes.