Why does lack of sleep cause migraines / tension headaches?

No.14384388 ViewReplyOriginalReport
Why does staying up very late and getting little sleep cause throbbing pain around temples and front of head for the rest of the day? What do scientists do all day when we still haven't figured out what causes headaches?