Servo twitching please help

#include <Servo.h>

Servo myservo;
int pos = 0;
const int FloatSwitch = 3;
const int ledPin = 2;
int buttonState = 0;
int Sangle=90;
int Eangle=180;
int tries=1;

void setup()
{
myservo.attach(9);
pinMode(ledPin, OUTPUT);
pinMode(FloatSwitch, INPUT);

}

void loop()
{
}

I have my arduino on a board with 5 v and then have the servo motor hooked to 3AAA batteries (4.5V). I have connected the grounds. For some reason the servo motor moves when it is attached to pin 9. Without my sending any commands, this code is attached. The power light on the board is not flickering at all. There is nothing else on the boards that could explain this. I never had this issue when using a servo controller and thought that the arudino could handle a small servo without any load (just using the servo.h and arduino capabilities). I guess not. Hopefully, someone has a good explanation for me,lol. Thanks in advance.

As the last thing in the startup() function do a:-
myservo.write(90 ) ; // set servo to mid-point

have the servo motor hooked to 3AAA batteries (4.5V)

Most servos are built to operate with 4.8v-6v.

Running a single servo at no load, you can connect the servo power to the Vin pin on the Arduino, the USB 5 v has more than enough current capacity for that. For battery power, as Zoom said, 4.8 v minimum. Your AAAs in series could easily be as low as 4.2 v.