7 month old puppy suddenly peeing in crate at night

Help needed! My 7 month old potty trained pup has suddenly been peeing in his crate like 5 minutes afte I set him in it for bed at night with no barking or alerting at all. He does not pee any where else in the house anymore and he NEVER peed in his crate even before he was house trained fully. He would always bark. We went to the vet today and did blood and urine work to make sure something medical isn’t going on and we will get those results back tomorrow. I’ve also ordered 2 new crate mats so that if he does do this again, it’s not as big of an ordeal. Right now, I’ve been obviously removing and washing the mat, but that means he can’t sleep in his crate so I have been sleeping with him on the couch with him in his other bed (it is too big for him to be on and stand in the crate). I’m worried that he is purposefully peeing so that he can sleep on the couch with me? But I don’t think dogs can connect that thoughts that way? I’m just at a loss. Has anyone else had this happen? Assuming nothing comes back wrong with any of his tests.

Not sure if it matters, but he did test positive for an ear infection at the vet so they gave him some medication in his ear. But I don’t think that would relate to him peeing only in his crate at night? I’m so confused.