The question has been raised many times - since 2005, even on this forum. Most responses seem to be guesswork (sometimes educated). The quote-concensus-unquote seems to agree with Check Airman - to fit in the wheel wells.
I'm not sure that really matters these days, since most gear in recent planes have a "tilt actuator" (A380, see also 777), therefore there is no
required relationship between the angle when stowed vs. the angle when extended. They don't hang simply according to gravity anymore.
The A380 wing gear seem to "untilt" to level/parallel with fuselage centerline as they are stowed, in this video:
https://youtu.be/nms0-x0wDGQ?t=2m3s
The fuselage gear retract by sliding back and up, like an escalator.
I've seen reference to the idea that tilted-down vs. tilted-up has to do with the airframe's natural aerodynamic tendency to pitch down or up on touchdown, with the main gear tilted to counter that tendency. The 767 tilts front-down, like the 380.