Is there any etiquette about how to proceed when a technical problem leads to a misplay in an online game? Recently I was playing an online game when I moved my king with the intent of castling. However, I apparently didn't get it far enough over, and when I "let it go", the king was placed in a square adjacent to the one it had left and the rook stayed in the corner.

I made a comment in the players' chat along the lines of "That was meant to be a castle." The other player even replied with something like "Yeah, I figured." However he proceeded to take advantage of the situation, eventually winning what had been an even game up to that point.

Unfortunately, this is not the first time this has happened to me. In fact it seems to happen disturbingly often, and I've only played a few dozen online games over the past few months. Also, I've seen some puzzling moves from opponents that I now think might have been due to trouble with the equipment, rather than just poor play.

In the game above, I considered asking for a draw right after the error, especially since my opponent acknowledged that it was a technical problem, not poor play. However I wasn't sure of the etiquette for this, and also had time considerations to worry about. Would it have been considered bad form to ask for a draw? To decline one if it is asked for from an opponent in such a circumstance?
That's called a mouse-slip, and it's part of playing online. Watch some of Carlsen's online play (e.g. https://www.youtube.com/watch?v=SJlOlufG-JM) and you'll see even he mouse-slips on occasion. Common etiquette seems to be to continue playing out the game and try to be more precise next time.