It's not typically 'risky' for most people, but may increase the chances of heart burn or acid reflux for some people (if they lie down shortly after eating a big meal).
.
If you know that cheese causes you problems if you eat that before bed, then don't eat it. There are PLENTY of other food items that aren't dairy. Everyone is different. I've not come across a specific food that gives me issues if I eat it before going to bed. You'll have to figure out for yourself what else, if anything, will be a problem for you.
That ised to happen to me too..when i was 17-26...im honestly not sure why it started or why it went away...it might have been eating too late...buy you also might becoming lactose intolerant...start taking vitamins daily and see if you have the same problem after 2 weeks