The incident happened Tuesday at a LaQuinta Hotel in Fairfield.
Police say 40-year-old Joseph Lipham told the woman he was an officer and would arrest her if she didn't have sex with him.
A friend of the victim was able to get Lipham's license plate number as he left the hotel, leading to his arrest.
"The diligence and prompt attention of all the investigators involved in this case resulted in the apprehension of this predator in less than 24 hours," Deputy Chief Anthony Manna said. "All of us in the law enforcement profession take very seriously those individuals who engage in criminal activity while fraudulently claiming to be a police officer."
Lipham is charged with two counts of sexual assault and one count of impersonating a law enforcement officer.