According to the band The Police bassist and front man Sting, this early hit for the band was written while he was drunk.
Sting has said that after a show in Germany, he was drunk in a hotel room, slumped on the bed and got the spins. He got up and to steady himself by walking around the room. That inspired him to sing ‘Walking round the room, ya, ya, walking round the room’.
The next morning he had remembered what had happened and wrote the riff down. Since he thought ‘Walking Round the Room’ was a stupid title he decided to go for something even more obtuse and switched it to ‘Walking on the Moon’.