The woman, identified as 58-year-old Tatsuko Horikawa, was found by police searching the home of a man, who believed he lived alone in Fukuoka.
The resident of the house, who has not been named, became suspicious that he was the victim of repeat burglaries after he noticed food was going missing from his refrigerator.
The man decided to install security cameras linked to his mobile phone, and on Wednesday, he caught images of a woman walking around the house while he was out. Believing he had detected the burglar, the man contacted police, and after an exhausting search of the property, officers found the woman hiding in the top of a built-in cupboard, designed to store bedding and mattresses.
Behind the sliding door, she had laid out a thin futon and had several plastic drink bottles, police said. There was just enough room for her to lay down, they added.
"We searched the house, checking everywhere that someone could possibly hide," said Hiroki Itakura, a police spokesman. "When we slid open the closet door, there she was, curled up nervously on her side."
Horikawa told police that she had nowhere to live and had first taken up residence in the cupboard, in a room that the man rarely used, about one year previously when the owner of the house had gone out and not locked the door.
Police believe she may have moved between different addresses in the neighbourhood during her stowaway year.
The woman did not apparently steal any money or other items from the house, but did make use of the shower and toilet.
The police described Horikawa as looking neat and clean. She was charged with trespassing.