An interesting collection of responses.
Perhaps they can achieve it though the following...
Direction - Using the earths magnetic field
Altitude - well they would know the pitch through airspeed, maybe air pressure tells them that they are at a certain altitude?
And maybe shadows which we can't see when in clouds helps them too. Even in the darkest clouds there is some form of light therefore some shadow. Perhaps birds' eyes are sensitive enough to use this.
Any thoughts on this? Are there any closet ornithologists amongst us?