@revincentiii Yes, but I don't think you should read too much into this behaviour. It may be something else, maybe it's warmer on the carpet even if it's less comfortable.
My dog slept a lot right in front of my door risking that I'd accidentally hit him with the door when I wake up years before he passed. My best guess was that in colder weather it was a warmer place, and otherwise he just wanted to be closer to me. I let him sleep in my room a lot, sometimes he just left in the middle of the night to go back to his original dog bed, or lay in front of my door, sometimes he didn't sleep there for days, sometimes he pulled his little blanket from one part of my room to the other.
I guess he just found what was perfect for the part of the night and if he felt too cold/hot, or wanted a change, he looked for another place.
His behaviour definitely changed in his last few days though, he was sick before, but I realised his condition was rapidly deteriorating, took off a few days from work and we literally spent his last days in bed, just snuggling up to each other, listening to his favourite music and eating his favourite foods. On his last day when he looked at me I kind of felt like he knew and accepted what was coming, he just stared into my eyes for a few long minutes. I think he wanted to say goodbye then.
We had to put him down because he was suffering and in a lot of pain, and the vet said that he would have been gone in a few days if we'd waited, only with more pain and suffering.
Maybe there is no scientific proof, but I talked to a lot of people who had to say goodbye to their pets (either if they died naturally or had to be put down), and everybody said the same thing about "the look", when they looked into their eyes on the last days and just knew it's time.
Maybe it's not 100% conscious, but I do believe they feel when they are near, like humans do.
Edit: added a few commas to a long sentence, grammar.