The best thing that my boys benefited from their bad sleeping habits or from their battle against sleep is to be able to count up to 100.
When they were 3, Y would keep running out of his bed announcing "Mummy, I can't sleep!" To avoid the tears and battle during bedtime, we came up with the "Count to 100" strategy. He would sit on the rocker chair with me and I would rock him as we count to 100. He has to go back to his bed after we count to 100 and may not come out again. He kept to the agreement sometimes, he fell asleep when we haven't even reached 50 sometimes or he would run out several times to count on some days. It started with me counting only, then with him counting after me, then progress to him counting with some help from me when he got stuck. After 2 months, he mastered his counting to 100. Counting to 100 was no longer challenging to him and the strategy didn't work anymore. I wanted to introduce skip counting but I'm happy that he came up with counting backwards himself. K, being a better sleeper who also count lesser is getting quite upset that his brother can count from 100-1 while he can only do 1-100.
Learning can take place in the most unconventional way. I would note in Y's growing journal that he mastered counting because he was the worst sleeper in the family.