Occasionally, HomePod has trouble playing anything I ask it to, until I restart it. Why?
Aha — I think the solution to this is on Apple’s support forums: https://discussions.apple.com/message/33564794#33564794

In short, HomePod seems to be unable to play music directly when it was last used as an Airplay speaker for Apple TV.

I confirmed that this was what was happening by going into the Airplay screen on my iPhone (open Control Center, and force-press on the Airplay icon in the audio control widget). There was an area in there showing me that my HomePod was receiving audio from my Apple TV (even though I’d put my Apple TV to sleep). When I tapped that to stop HomePod playing audio from the Apple TV, HomePod was able to play music when I asked it to.