Ever wondered why babies so often wake when you put them down in the cot? This is because babies do not sleep like adults. They have short sleep cycles, as little as 50 minutes compared to an adults 1 hour and 30 minutes. They spend the first 20 minutes of this sleep cycle in a light sleep, and this will be followed by another 30 minutes of deep sleep (approximate times). If you have cuddled your baby off to sleep and then attempt to put them down in that first 20 minutes, baby will more than likely wake, as during the light phase they are very easily woken.
So if you want baby to stay asleep when you put them down, enjoy that cuddle for a little bit longer. Even the fussiest baby will not stir during the deep sleep phase. You do not have to time it, baby is in a deep sleep once all the twitching stops and you feel their head become heavy in your arms.