Do lair actions occur when the monster isn’t in the lair?

This may be up to the DM, but if the monster that normally lives in the lair is alive, do they need to be in their lair for the lair actions to manifest?

Or is the lair independent of the monster until the monster is dead?