After years of sleeping late, I can't sleep early even at 10pm. My mind just races for hours till 2-3pm. Next day I feel groggy. How to fix it?

Relaxation exercises. Buy dr. Norman benson's relaxation response (dr. Benson is a distinguished harvard med school professor - excellent guide to different types of relaxation exercises - first written in the 70's check out books by jon kabat zinn also. Vigorous exercise in the am or early afternoon also helpful for relaxation as well as general health. Too much sleep can also make for problems. ~8 hours ideal.