I'm an avid tennis player myself and, sadly, riads in the medina don't have tennis facilities. So, if you're determined to stay somewhere with tennis on-site, you'll be looking to stay at a big hotel outside of the medina. I haven't stayed at any of these personally, but here's a link I've found to hotels that list having courts in the property:
Check the hotel names out and then come back to TA to check out the reviews to see if they're "right" for you and the family.
(Personally speaking: I'd forego the tennis for the charm, experience and vibe of staying in a riad...and find tennis off the property, but that's just my opinion).
Google is great for searches like this too...