if you have an RV or something like that you can stay at the track parking lot with security 10pm till 7am.
here's some hotels I found on the safe side:
Howard Johnson Plaza Hotel Miami Airport
5.62 miles
7707 NW 103rd Street
State Road 826 and NW 103rd St
Hialeah Gardens, FL, 33016 US
Phone: 305-825-1000
Fax: 305-556-6785
E-Mail: info@hojomia.com
Holiday Inn Express Hotel & Suites Miami-Hialeah (Miami Lakes)Address:
6.17 miles
6650 West 20th Avenue
Hialeah, FL 33016
(877) 863-4780