All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
These are Satanic vexations that are prompted by Allaah because of non-observance of Prophetic supplications.
Here is the cure:
1- First and foremost, observe the prescribed prayers at their due times.
2- Perform the voluntary prayers both before or after the prescribed ones.
3- Make many other voluntary acts of worship.
4- Remember Allaah and mention Him in all situations, like making morning and evening Athkaar, supplications before and after sleeping, and after ablutions.
5- Recitate daily Chapter Al-Baqarah until these Satanic vexations are over. It is permissible to read it two or three times if you have further experiences.
Allaah Knows best.