Hi July,
I haven't done that myself, but seen many new developments in Williamstown building gardens on top of their garages (due to a lack of outdoor living areas downstairs, as some of the blocks are tiny)... not sure about any pitfalls, but I would assume the foundations would need to be...