Update: I stopped taking my vitamin D supplement, my last dose being on 16th August. I went to sleep on 17th Aug and to my surprise I did not have a bad dream, and haven't had one since. I'm surprised that the weird dreams stopped so quickly to be honest, but I'm not complaining as I'm sleeping...