Kicking legs wake her up

Help! My 4 month old baby sleeps well but the moment I put her down she lifts up her legs and kicks them or ends up grabbing them with her hands in her sleep... if i dont hold her legs down she wakes herself up but i cant hold her legs all night... has anyone else experienced this and have any tips?