The term Sihr is taken from the world Sahar which is the later part of the night and usually such things are done in the secrecy of that time when people are usually asleep. And also the effect of Sihr is said to be the influence or capture of other worldly beings like Jinns. So, it is always suggested to the muslims to stay regular with your namaz and seek protection of Allah from such influences.