Police said that the attack happened in Dreieich, south of Frankfurt, just before 2.30am, and that the unknown gunmen targeted one of the building's windows.
The 23-year-old man was hit while he slept and was slightly injured. He was brought to hospital but was released after being treated briefly by doctors.
Officers say that they are investigating as fast as possible but would not reveal details about the type of munitions used or any possible political motivation for the attack.
Police forensics specialists examine bullet impacts in the window of a refugee home in Dreieich, south of Frankfurt, on Monday. Photo: DPA
“It could be anything. We are investigating all possibilities,” a spokesman said.
Detectives have locked down the area around the accommodation block and are hunting for forensic evidence.
Witnesses are requested to call the Criminal Police in Offenbach on 069 8098 1234.