These were not members of the German armed forces, they were Germans living in the UK, civilians who were considered to be enemy aliens and thus needed to be locked up for the duration. Their English families could also be interned but that was probably not mandatory.
Over 17,000 German and other civilian prisoners of war were interned at Alexandra Palace between 1914 and 1919. says up to 3,000 internees slept in rows of plank beds in the Great Hall and two other large halls. has some films about the preparations.
2017: has a good post on this.
2021: has a local newspaper article from 1919 which refers to the work done in the gardens by the PoWs: "Mr Sloper says they have left their mark on the ground. Happily, it is not the same kind of mark they have left in Belgium and Northern France."
Comments are provided by Facebook, please ensure you are signed in to see them