For rotation matrices, the columns form the basis vectors for the space. So, for any rotation matrix, we can simply grab the columns, in order, for our X(right), Y(up), and Z(forward) vectors. Note that the named axis convention is the default, and an ordering of forward, left, up would do as well, depending on the orientation.
For the modelview matrix, however, things are a bit different, since the matrix is typically the inverse of that which orients the camera in the world. Given that for any rotation matrix, the inverse is equivalent to the transpose, we can extract the vectors from the rows instead (or the columns of the transpose).
If M is the current modelview matrix (with only the camera transform at the top of the stack), then we can extract the basis vectors as follows:
right = Vector(M, M, M );
up = Vector(M, M, M );
forward = -Vector(M, M, M);
Again, the names are arbitrary, and depend entirely on your conventions to give them meaning. In my world, for instance, I have Z going up (instead of Y), and my order goes: X(forward), Y(left), Z(up).