Some factors to consider:
- The initial cleanliness of the cupboard
- The particulate retention of the platform material
- The presence or absence of a textured shelf liner
- The presence or absence of cupboard doors
- The amount of time the cup is stored before use
- The amount of moisture still on the cup when it is put away
- The arrangement of cups (stacks or singles; rim-side up or rim-side down)
- The environmental effects of temperature, humidity, and open air on bacteria cultures
- The pathways of contamination (any part of the cup that contacts the drinker or the liquid, e.g. a lip-sized portion of the rim and the interior; anything that touches the cup)
As you can see, the permutations are endless, so it is useful to fix or ignore some variables when considering the problem. Take, for example, a comparison of platform cleanliness, cup arrangement, and time stored (ignoring all but three variables). You might note that if you placed a single cup on a layer of dust in a cupboard with the rim-side down for one minute and then drank out of it, you would ingest more dust than if you had placed the cup rim-side up for the same amount of time (modifying only one of the three variables). Keep in mind that some of these conditions aren't worth consideration singly (a clean cupboard is obviously more ideal than a dirty cupboard), and take relevance only when paired (if a cupboard's surface was unavoidably dirty, a rim-side up approach might be better). So while I am reaching for an "ideal," we are dealing with real-world conditions and it would make sense to imagine an "average household" for the purpose of this question.
I have had this argument at length with multiple people. Most households have an idiosyncratic Correct Way which usually boils down to the rim-side-up-or-down dichotomy. While this is the most common form of the problem, I found the underlying precepts to be wide-ranging and marginalized by the debate over the rims. Many of those precepts are listed above.
So, what combination of these conditions is hygienically ideal?