Tengo matemáticas en cuarto período.
However, depending on the context, you might also say:
* Tengo matemáticas a cuarta hora. (This is more common in some Spanish-speaking regions, using "hora" instead of "período")
Both are correct, but the first one is generally more widely understood.