2 1/2year old wakes up screaming with a fever of 38.5c and saying head hurts 2 nights in a row. During the day she's happy, active and fine.?

High fever. Can cause headache. Watch the child for few more days. If headache persist, consult with your doctor.
Look closely. Headache can accompany fever so the issue is intermittent fever. There are many possibilities. Most likely is a viral illness which would end in a few days. Another possibility is a urinary tract infection. That could be checked by getting a clean catch urine. If fever persists for more than 5 days even if child is fine during the day she should be seen by md to check for other problems.