This does only work when attacking a creature. This is how it reads in the rulebook.
Mana Drain +X
If this attack damages an enemy creature, that creature’s controller loses
X mana from his mana supply (if he has any). If the attack makes multiple
attacks against the same or different objects, it gains this bonus only for the
first attack it makes.