Is this normal for a 5 month old?

My son is 5 months old and when I put him to sleep I either nurse him or use the swing when he falls asleep I leave him on the swing or crib. When he wakes up he starts screaming like I'm gone forever or something like he's scared. He's been doing for awhile and I thought by now it would pass.