According to Professor Lynn Rogers, who has studied wild bears for many years, they hum when they are content.
(He doesn't mention what they hum, maybe it's "The bear necessities".)