Yes. You might get some questions (especially regarding your daily needs / routine), but there is nothing preventing you from doing so.
So long as the driver doesn't answer, "a motel" if he gets asked, "where did you stay?" Because that will be followed up with, "where's the receipt?" I would say, "at a friend's." "What's your friend's name?" "Nuna." "Nuna?" "Nuna Business."
Unless you have an RV-style sleeper with a commode, it would be better to add a couple 30-minute "off duty" segments (even if you stayed in the sleeper) to prevent the DOT from breaking out a fine-tooth comb. There is nothing on the books, but many DOT officers consider 24 hours straight in the sleeper as a falsified log. They are wrong, but is it worth the fight?
Why are earth would you discuss your log with an officer? It speaks for itself. Answer their questions with silence
I do pretty much exactly what you say, but about 99.99% of drivers blab a torrent of words that would put Niagara Falls to shame... then they wonder why they get put out of service.
Did that and got questioned on it once. My answer was extremely crude, but effective. I left with no violation.