My then-girlfriend (now wife) and I got randomly upgraded on a JFK
flight a couple of years ago, although it was operated by Northwest. The gate agent pulled us aside, literally as we were stepping through the door to the jetway, said "let me see those boarding passes" with a grin, and handed us a pair for WBC. I think they were overbooked in Y, had a few seats up front, and thought we looked like a nice couple. Quite unexpected, but a very pleasant surprise. The same NW
agents work KLM flights, so you never know!
In any event, I don't see the harm in asking, as long as you're polite about it and aren't bothering the agent. If the agent is friendly and--most important--not busy with other stuff or clearly having a bad day, and you strike up a conversation, there's nothing wrong with saying offhand, "so, I don't suppose there's any chance of getting an upgrade..." Odds are that they'll just laugh and say "yeah, right," but if they're overbooked in coach they might just decide they like you enough to give you the upgrade rather than the next person in line.
Common sense is not so common. -Voltaire