The Matrix has any number of pop culture antecedents, but the most significant and by far the most well-known of them as far as the basic plot is concerned is 'The Cage' (aka 'The Menagerie'), the original Star Trek pilot that was reworked as a two-part episode during the original series' first season.
We have three nearly-omnipotent figures with the power to alter a person's (specifically, an abductee's) perception of the physical world and do so while their subjects are imprisoned.