It's theoretically possible to upgrade the camera in the N900 if the new camera uses the same way of connecting to hardware. http://wiki.maemo.org/N900_camera_sensor
It wouldn't take a lot of time for somebody who already has both N900 and 12MP camera module. Such a camera module wouldn't cost much if it were sold separately. But it's difficult to find one and be sure it's compatible.
Many people consider 5MP photographs very good and say that the limitation is in software, not in hardware. The reason to wish to have 12MP is that CPU allows it, and 12MP cameras already exist. Upgrading CPU is too adventurous to attempt it; N900 with 12MP camera and better software would already make beautiful high-resolution photographs. And I hope to use N900 for ten years, if possible, not less.