Baby sleep

Kat
Ok, so I've coslept with my son pretty much since we came home from the hospital. I tried to get him to sleep in the newborn sleeper in his pack n play, but he would only sleep in it for a short time before waking up and I would have to hold him on my chest to keep him asleep. Now he's 3 months and he still has a hard time sleeping on his own. He's only ever slept in the pack n play once for 2 hours before waking up to eat. He sometimes sleeps in his swing, but it's still mostly in our bed, snuggled up to my side where he can get at my breast. It makes it easier to feed him, and he never fully wakes up, just gets restless until I get him to latch and he calms back down. My problem is, lately he's started kicking and flailing his arms in his sleep and it's not bc he's hungry. He's just active. I don't mind having him in our bed, but he's actually kicking and hitting hard enough to hurt a bit, so I'm thinking of trying to get him to sleep in his bed. Any tips on how to get him to stay asleep in it? I don't think his night nursing is bc he's hungry, but to sooth himself. He hasn't woken up at night in about 4 weeks.