Officers were called to a home on 21st Street around 2:15 am.
When they arrived, the victim told investigators that he was attacked and hit in the head with the hammer.
Police say 51-year-old Brian Arredondo swung the tool at the victim's head three times.
Paramedics helped the victim, who suffered minor injuries.
Investigators also recovered the hammer. Detectives are working to determine what led up to the attack.
Arredondo was taken into custody by officers. He is facing charges of attempted murder.