Why is my dog protective only at night?

My 1 year old Border Collie is scared of eeeeeverything.. he's a big puppy! A simple light outside will scare him off and run away.. last night I let him slept with me on the bed, normally he have is own spot in my room but I wanted to cuddle with him a bit since i worked a lot recently.. and he just sat there.. beside me on the bed and stares at the bedroom door like somebody will walk in.. he looked like a guard dog with so much confidence..He never acted protective before.. he's just a big ball of fun and energy like everything is a game.. I'm a bit lost.. is it okay? Should I let him do that? And for what reason he do that for? (If my english is bad im sorry)