Ok, so when you press f3 to show the debug info, the Y value represents your height. But I'm not sure what is bases it on. Example: when you're on the same block level as the ocean, it says 64 but is that your eye-level or the block you're on?
It's based on eye-level, the height your camera is at.
Create a superflat map and stand on top of the bedrock. The y value is about 2.6, and one block lower (standing on the bottom of the map) would be 1.6. The height measured is 1.6 above your feet. Furthermore, if you use creative to break through bedrock and fly you'll see that y=0 is where your camera is level with the bottom of the bedrock.