The gear doors would be closed on a A330 when it's on the ground under normal circumstances, so he wouldn't have been spotted during a walk around. Although I'm surprised he didn't "disembark" at STN.
One of the companies that I do a bit of work for found a poor chap dead in the MLG bay of a A330 a couple of years ago, he was only discovered because the crew and maintenance staff noticed a strange smell around the aircraft, his body was found only when the MLG doors were opened and mechanics crawled up into the MLG bay to have a look.
I assume this guy probably hitched a ride in the same place.