Because of the delay it makes me wonder about this circumstance (this is a wild stretch, but possible).
It's possible you have a series wiring problem. The power must go through the TV to get to the lamp and the lamp must be on to allow the current to flow. This could happen by a loose connection on 1 of the outlets or junctions and not necessarily the ones with the symptoms. If this is the case I would say you also have merged circuits somewhere to make this posible. Probably when you were there the lamp was on.