From the Moldvay-edited D&D Basic Set...
Duration: 4-16 turns
This spell will put creatures to sleep for 4d4 turns. The caster can only affect creatures with 4+1 hit dice or less. Only 1 creature with 4+1 hit dice will be affected; otherwise, the spell affects 2-16 (2d8) hit dice of creatures. The undead cannot be put to sleep. When affecting a group of creatures of mixed levels (hit dice), lower level creatures will always be put to sleep before higher level ones. Any “pluses” are ignored (for example, 2+1 hit dice is treated as 2 hit dice). Creatures with less than 1 hit die are still considered as 1 hit die. Any sleeping creature may be awakened by force (such as a slap). A sleeping creature may be killed (regardless of its hit points) with a single blow with any edged weapon.
EXAMPLE: A party encounters 4 hungry lizard men. Sarien, an elf, casts a sleep spell at them. The DM rolls 2d8; the result of 7 means that 7 levels of creatures are affected. Lizard men have 2+1 hit dice each, treated as 2 for the effects of this spell. Three lizard men fall asleep: 7 divided by 2 equals 3 &12;, but a creature cannot be “partially” asleep from the spell.
Perhaps listing only a range and no area of effect is intentional†, but what if it isn’t an area-of-effect spell? I’m considering the following clarification:
Before rolling the HD affected, the player must indicate which creatures are being targeted. The caster must be able to see the targets. Then, after the roll, the DM determines which creatures are actually affected, giving preference to the lower HD creatures as described above.
So, the caster could choose to only target a higher HD creature to prevent lower HD creatures from soaking it all up. And I think I’m OK with that, since there’s a trade-off here. e.g. Target fewer creatures with more consistent results or target more creatures with more random results. In also means that Sleep won’t accidentally affect an ally, and that’s the way I’ve usually played it anyway.
†For what it’s worth, in the Rules Cyclopedia, an area of effect was specified. I believe it said a 40-foot square.