As soon as I turn off the last light in the house every night, if I forgot to take the dog (miniature dachshund) out immediately prior, the dog will wake up within an hour and indicate he has to go out.

If I do not take him out, he will urinate on a bathroom throw rug.  Occasionally he will try to drink / lick up whatever is caught in the carpet fibers.  He has water and food available to him and he seems to eat well.  

I don't think he's ashamed of having done what he's done, but he could be; I suspect he is bored.

Why is he doing this?  He doesn't do this when he goes in the grass; he doesn't even turn around to acknowledge it when we're outside; granted, it's already soaked down, but it should smell the same.