So I've been playing on and off for about 5 years and since I started playing again a month ago my skill level and accuracy is higher than its ever been and I even offer to play in front of friends and even strangers without any stage fright something I could never do before also I've been making a point to have higher confidence in general, my question is why am I getting better after such a long layoff?
Perhaps you're more determined to learn now. Whatever it is, just stick with it.
Well, you said it yourself, you're making a point to have high confidence. You are probably more confident that you're a somewhat decent player so that is driving you to make it sound better.

No matter what it may be, keep at it. I've been playing for 5 years with a shit ton of tie playing and I like playing for other people (even did a few gigs as a "guest" on a few songs with some bands and I played with a song with my school's orchestra). I don't play out or in front of groups often, but I never had a problem with it. As long as you have the desire to get better, you will.
Skip the username, call me Billy
How long did you stop playing for the last time? In the past the past whenever I used to have breaks from the guitar (I don't do this anymore) I noticed a similar thing in that once I got over the initial rustiness I found I was better than when I stopped playing.

I believe the reason might be that your muscle memory from the practice you did up to the point you stopped playing still keeps working away while you're 'resting'. Hence, when you start again you've actually improved even though you haven't been playing. I'm not sure this would be true if you had a long break from the guitar though...
Quote by ihartfood
all about cojones and you've probably been listening to stuff a good bit right?

this. You picked it up, started playing and probably didnt care to much how you sounded... rather just started playing and said f-it. Lets just see what comes out. That relaxed attitude had you chill enough to just play and forget about all the other crap that screws you up when performing in front of anyone
he of tranquil mind