This happens to me 100% during a good (i.e. deeply realizing)massage, but the visions are tied to specific random memories. If the sex is very relaxing sex, then this happens as well.
Maybe you just have a lot of self created “manufactured” memories that are not tied to specific actual events in your life, but linger anyway.