I would disagree, the Louise character arc is one of the more interesting ones in the novels and to me it makes sense for her character at that point in the novels.
She starts as a naive country girl whose pastoral somewhat backwards lifestyle is turned upside down by the arrival of the dashing spacefarer Joshua. As an isolated event her triste and resulting pregnancy might have just been a minor local scandal on Norfolk but with the wider events she is thrust into an epic quest which ends up on Earth, a world as far removed from anything she has known or she could have imagined.
At the point in the the novels you refer to she is faced with being alone on a strange world facing the imminent end of human civilization. In this scenario I think anyone would long for some human contact however fleeting.
Andy Behoo is the only person she knows left on Earth at that moment and so she seeks him out. Its my reading that she is simply looking to feel loved and Andy has certainly made his feeling towards her known earlier in the novels even if those feelings were not reciprocated. She sleeps with him because she feels the need for human contact and because she has developed as a character to the point where she is taking charge of her life rather than simply being swept along by events as she has done throughout most of the novels.
If you knew it might be your last night alive would you want to be alone when you could have some kind of human contact whatever that may be?