The effect of caffeine on the human body does not last very long. Caffeine is broken down into other metabolites in the human liver and evaporates in the body in less than an hour. If a large amount of caffeine is ingested at one time, its stimulating effect on the central nervous system will also wear off quickly within three or four hours. If you go to bed at eleven o'clock, then drinking tea three or four hours before going to bed will have almost no effect on your sleep.
But not everyone who drinks Puerh tea will suffer from insomnia because of the different constitution of individuals,