Those numbers depend on what the RGB color space is, and what the grayscale color space is. Yes, grayscale is subject to standard color management just like RGB. It's just one channel instead of three. RGB color spaces are sRGB, Adobe RGB and so on; grayscale color spaces are Dot Gain 15%, Gray gamma 2.2, sGray etc.
Numbers are color space specific. This is important to understand. Any given color will yield different numbers in different color spaces. Any given set of numbers will yield different colors in different color spaces. This applies to grayscale as much as RGB (or CMYK).
Hex is just a convenient way to express RGB numbers. It has no significance beyond convenience.
If you just use Image > Mode, the grayscale profile is determined by whatever you have as working gray. It's better to convert directly to the grayscale profile you want, with Edit > Convert to Profile. You should be aware that the default gray in Photoshop, Dot Gain 20%, is virtually useless for any practical purpose. The problem is that outside Photoshop, grayscale color management support is virtually non-existent. So while everything looks fine in Photoshop, all conversions performed as they should - the moment you move that file outside Photoshop, you get massive tone and contrast changes.
In converting from RGB to grayscale, you get the least surprises if you pick a grayscale profile with the same tone response curve as the RGB profile. So you'd use sRGB > sGray, Adobe RGB > Gray Gamma 2.2, and ProPhoto > Gray Gamma 1.8. If you do that, the numbers should stay reasonably consistent.
There is still the problem of what to do with the grayscale file outside Photoshop, because almost no software on the planet will treat it correctly. The grayscale profile will largely be ignored, even in applications that otherwise are fully color managed. The safest one all over is probably Gamma 2.2.
The simple answer, which is the one I usually give, is: avoid grayscale if you can. It's a minefield, and the likelihood of getting a nasty surprise is very high. For screen use, a monochrome sRGB file is always safe(r).
For offset CMYK print, grayscale traditionally and by convention prints on the black plate only (saving money). So it has a purpose there, and there are ways to control the result by converting to <black ink> CMYK. But that's a different and longer story.