The sentence is a complicated one and there are few things going on here.
First, there is metonymy, that is, reference to a thing (here, the group of people who wake up) via the name of something associated with that thing (here, their school). So, the singular reflexive itself is used here, because the metonym, Hogwarts, names an institution, which is singular (you would say Hogwarts is (not are) lovely under the snow).
Second, as Lawton pointed out, it is the school building that was covered in snow, not the school students, even though the school students woke up, not the school building. That is, Hogwarts refers to different things in Hogwarts woke and Hogwarts was covered in snow. This is a curious but common fact about institutional nouns. Noam Chomsky, the famous linguist, has pointed out that you can say things like After the bank burned down, it moved across the street, where the first clause means the bank as a building, and the second, the bank as a business (clearly, the burnt out building didn't move across the street).
Finally, though, none of this answers your original question, whether it is okay to use itself for more than one person. Leaving metonymy aside, you can do this in some dialects of English (such as Rowling's) with collective nouns. For instance, it's fine for me to say After realising its uselessness, the committee disbanded itself.
[Appendix:] The sentence Noah quoted doesn't contain any anthropomorphism (contrary to a few comments above).
Anthropomorphism is the ascription of human properties to nonhumans. For example, The sun glared angrily at the travellers or The labrador had once again acted with gross turpitude. Though anger and turpitude are properties of people or their actions, we can use them to characterize how behaviours of non-humans look or feel to us. When we do so, we anthropomorphize the objects in question (the sun, a dog, etc.). (Of course, it wouldn't be anthropomorphic to say The labrador glared angrily at the travellers, not unless you believe that dogs can't be angry.)
There is no anthropomorphism in Rowling's sentence because no property is ascribed to a non-human. The non-human in play is the collection of buildings that make up Hogwarts school. However, as a few people noted above, the buildings are not being said to have woken up. Rather, the school name is used as a stand in (that is, a metonym) for the students and staff who comprise the school.
Hence, this is metonymy, rather than anthropomorphism.