In the 5e master manual it says that, at a certain scale on a regional map, hexagons represent a certain amount of miles. Does it refer to sides or distance from the center of a hex to another?
The scale of a grid map is generally the distance between the centers of immediately adjacent cells, and in particular this is the case for the hex maps recommended by 5th Edition Dungeons and Dragons for overland travel. This is so that travel distances can be calculated by multiplying the number of cell-to-cell transitions by the map scale, or conversely that the number of cells to be traversed can be calculated by dividing travel speed by the map scale. This is not stated explicitly in the Dungeon Master's Guide in the section on mapping, but can be inferred from these passages on page 14, "Mapping Your Campaign." First, from the section "Kingdom Scale":
On a kingdom-scale map, each hex represents 6 miles.
Then from the section "Continent Scale":
For mapping a whole continent, use a scale where 1 hex represents 60 miles.
And finally from the section "Combining Scales":
Two cities that are 3 hexes (180 miles) apart on your continent map would be 30 hexes apart on your kingdom map, and might define the opposite ends of the region you're detailing.
From this we can infer that one can calculate the distance between hexes by multiplying the scale by the number of hexes traversed, which is only true if the scale measures the distance between centers of adjacent hexes.
For a square grid, this happens to also be the length of the edge of a grid cell. This is not the case for other regular divisions of the plane.
The entire hexagon is X distance. You count the hexagons to measure distance starting from adjacent hexagon to your starting point.
The Player's Handbook covers how to measure on a map in the section on creature size where they discuss using the Variant: Playing on a Grid (PHB, 192) with my emphasis:
Ranges To determine the range on a grid between two things—whether creatures or objects—start counting squares from a square adjacent to one of them and stop counting in the space of the other one. Count by the shortest route.
Simply counting the hexes from the grid next to your starting point to the grid where you want to stop is how you measure the distance. If a hex is 1 mile, then 5 hexes would be 5 miles. But simply moving from one hex to another would trigger the 1 mile distance.
It doesn't really matter if you're in the middle or the edge, it's moving from a one grid space to another that triggers the 'movement'.
But this is for smaller scale object/creature distances!
I do understand that the rules cited above are not specifically for the larger scale, but without any other rule specifying for that, then the rules for measuring distance on a grid for creatures/objects seems the most reasonable to apply without anything that changes it provided.
If you do need to scale down because the distance is inside the grid space, it may best to switch to a different scaled map, bit you can use the total distance of the larger scale to help you do this.
1 hex = 1 mile means the hexagon is 1 mile across from one side to the other
So, if you were stood in the middle of the hex, it would be 0.5 miles from each of the sides if you walked in a straight line. It would be slightly further to walk to one of the corners.
Another way of looking at it would be that the distance from the centre of one hexagon to the centre of an adjacent hexagon would be one mile.