The first is to whisper to the closest person and quietly say 'Where the HELL am I?' but as a seasoned professional I would not recommend this approach. Your communicative skills are probably not up to scratch (this would explain the pool cue-shaped bruise from the evening previous when a disagreement over the "one shot on the black" rule with a friendly biker resulted in a hitherto unplanned marathon run 'cross town) and the garbled sentence you drool out may sound to the untrained ear like; 'Where have you taken ME?What did you do with my wife?'. Also no one wants to talk to anyone on a tram.
The best way is to just kick back and relax till the outside world starts to feel familiar. Get a few more hours of sleep in. If you have boarded the wrong tram just sleep it off until you reach the city again. Once you're back in the welcoming arms of Melbourne change trams. You might even tuck into the breakfast menu if you so desire. The only difference right now between you and a gutter tramp is that your alleyway is mobile and air-conditioned. Just avoid the silly people going to work complaining about your smell.
What's my age again?