I had a similar experience when I forgot to take my SNRI antidepressant. I woke up in the middle of the night, and when I tried to continue sleeping I had these ultra-detailed geometric patterns dancing before me. The visuals were nice, but then my ears started ringing too which started bothering me, so I opened my eyes and woke up completely, which stopped the visuals and the ringing.