This is certainly possible, but I would not recommend it, for the simple reason that many thousands of points could be generated in this way in just a couple of seconds.
You could use something like this (not tested) :
var aPolyPts = []; // Global
var userDrawnPoly = new google.maps.Polyline(); // Global
google.maps.event.addListener(map, "mousemove", function(event) {
var pos = event.latLng;
//var lat = pos.lat();
//var lng = pos.lng();
aPolyPts.push(pos);
userDrawnPoly.setPath(aPolyPts);
userDrawnPoly.setMap(map);
});
Ideally, you would want to slow down the rate at which points are added to the polygon, either by placing a setTimeout() in the listener code or, better, not to use mousemove listener at all, but rather a click or rightclick listener so that points are only added to the polyline when the user clicks (or right-clicks) on the map.
HTH,
Rob