What decides when the "got comfy" bonus happens?

I notice that it shows when I read in armchairs, and sometimes even in a car reclining seat. But sometimes it doesn’t happen? Is it just random?

I found the code which assigns the bonus, the condition depends on a comfortable tempurature also, and possibly requires a blanket/fire as well (not sure if I’m reading the code right)?