Servo motors moves to extreme angles and comes to normal while powered on?

I am using MG996r servo motors in my project. while initially i switching on my power supply all 2 servo motors move to and fro to extreme angles once and comes to normal given position in setup code? What is happening? If i connect servo signal wire after 3sec of powered on means there is no such affect it simply smooth goes to given angle..While signal wire is connected i powered on means motors behaves crazy whil einitial power up and after it acts normal..

Can't see your code. Can't see your wiring. Don't know how the servos are powered. Pretty much blind. How can we give intelligent assistance?

The how to use this forum-please read sticky has information on what you should include in your post so that we can help you. Also instructions on how to properly post code.

What position do you want the servos to start at?