Why can't I say 'I almost don't sleep? Is there any rule about it?
You can say, "I almost don't sleep." In an ongoing situation where sleep is very difficult for a period of time, it means you get very little sleep during that period. E.g.:
"I have always been a light sleeper, but now that I am in medical school, I almost don't sleep."
It sounds fine to me.
I don't think it's ungrammatical, but it's not a natural way to say anything for a native speaker. "I almost don't" wouldn't be a construction you see very often.
"I barely" would be fine, and "I almost didn't" would also be fine (they mean different things from one another), but "I almost don't" is just not something you see. So, "I barely sleep" means that, in general, one sleeps very little. "I almost didn't sleep" means that, on one occasion or perhaps over a period of time, one came close to not sleeping.