GRACE spherical harmonics are well-adapted for representation of hydrological signals in river drainage basins of large size such as the Amazon or Mississippi basins. However, when one needs to study smaller drainage basins, one comes up against the low spatial resolution of the solutions in spherical harmonics. To overcome this limitation, we propose a new approach based on Slepian functions which can reduce the energy loss by integrating information in the spatial, spectral and time domains. Another advantage of these regionally-defined functions is the reduction of the problem dimensions compared to the spherical harmonic parameters. This also induces a drastic reduction of the computational time. These Slepian functions are used to invert the GRACE satellite data to restore the water mass fluxes of different hydro-climatologic environments in Africa. We apply them to two African drainage basins chosen for their size of medium scale and their geometric specificities: the Congo river basin with a quasi-isotropic shape and the Nile river basin with an anisotropic and more complex shape. Time series of Slepian coefficients have been estimated from real along-track GRACE geopotential differences for about ten years, and these coefficients are in agreement with both the spherical harmonic solutions provided by the official centers CSR, GFZ, JPL and the GLDAS model used for validation. The Slepian function analysis highlights the water mass variations at sub-basin scales in both basins.