The phrasing of the invocation from XGtE pg. 56 is:
You no longer need to sleep and can't be forced to sleep by any means. (emphasis mine)
To me this phrasing sounds like it is specifically referring to means such as the Sleep spell, however I have seen it argued in other places that since Sleep's phrasing is:
Each creature affected by this spell falls unconscious until the spell ends... PHB pg. 276 (emphasis mine)
Since AotM does not make one immune to the unconscious condition, a Warlock would still be affected even with this invocation.
However the phrasing of the spell also uses words like "magical slumber" and "the sleeper".