There are lots of possible causes. Diet, not getting enough sleep, not sleeping well, unresolved stress, going to sleep to late, and not keeping a regular sleeping schedule immediately come to my mind and any could well be causative factors. If you provide some more details, I could give better tips but here are some general ones.
• Don’t eat late at night; stay away from caffeine, sugar, etc. at night.
• Eat whole foods, organic if possible: vegetables (especially green leafy and cruciferous), fungi, beans, whole grains, fruit.
• Get enough sleep, at least 6-8 hours .
• If you’re not sleeping well (awake at night, waking up in middle of night), figure out what’s causing it; the tips here might help.
• Early to bed, early to rise makes a man healthy, wealthy, and wise. So said Ben Franklin and it’s true in my experience. Go to bed earlier and wake up earlier.
• Go to bed and wake up at the same time whenever possible
My personal experience based on hindsight:
I used to be irritable and groggy in the morning because I hated
the feelings associated with waking up, I hated the morning, I hated the whole concept of it. I was depressed at the time so I hated a lot of things. I also usually went to bed around 3am on the weekdays and woke up for school around 8pm so I never got enough sleep. I was chronically tired and that contributed to irritability. I hated the thought of facing another pointless day. I hated getting out of my warm, comfortable bed. On the weekends, I avoided the morning by going to bed ridiculously late and waking up some time in the late afternoon.
Hope some of that helps.