I took a video of a Common Loon in a lake while in Canada recently and saw it doing something with its foot, but didn't know what to think of it. I found out it is called "foot waggling" which is what some loons do during preening to stretch their legs, etc.
James D. Paruk studied this and wrote about it:
The foot waggle behavior in Common Loons (Gavia immer) has been postulated to serve primarily as a comfort movement, but may also have a role in thermoregulation. I studied foot waggles in Common Loons during 1994–1996. Foot waggling was most often associated with preening and resting behaviors (81.1%). They were observed also during agonistic encounters with conspecifics, in response to human disturbance (boating), and during social gatherings with other loons. Foot waggle frequency was compared to wind speed, ambient temperature, water temperature, and incident light levels. Wind speed had a negative effect and incident light had a positive effect on adult loon foot waggle frequency. Ambient air temperature and water temperature had no effect on the frequency of foot waggling. Adult loons with young foot waggled 4–5 times more per day during July–August than in May–June, when they were without young. The data suggest the loon foot waggle is primarily a comfort movement, but may also be indirectly involved in attempts by individuals to thermoregulate.
This video is not the greatest because it was windy. It shows a loon "foot waggling" 3 times.